Commit e61f272a authored by Stefan Behnel's avatar Stefan Behnel

comment on 'not None' signature annotation for memoryview parameters

parent dc60a99b
......@@ -587,6 +587,13 @@ be be checked for being None as well::
def func(double[:] myarray = None):
print myarray is None
If the function requires real memory views as input, it is therefore best to
reject None input straight away in the signature, which is supported in Cython
0.17 and later as follows::
def func(double[:] myarray not None):
...
Unlike object attributes of extension classes, memoryview slices are not
initialized to None.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment