Stefan Behnel wrote:
> Dag Sverre Seljebotn, 13.04.2010 09:11:
>
>> The argument against changing the default is simply that there is
>> another option which is much closer to Python semantics
>>
>
> I think the "another option" bit in this sentence is at the core of our
> disagreement. My point is that incorrect input should be caught early, and
> None is incorrect (and dangerous) input in almost all cases where a typed
> value is expected. So rejecting this dangerous input should be the default.
>
I'll just repeat Robert: I think the core of the disagreement is that
def f(X x):
...
should correspond directly to
def f(obj):
cdef X x = obj
I.e., no special casing of arguments vs. other typed variables.
This is simply because anything else is not going to be obvious to
anybody learning the language. It's seems very complicated to hold a
Cython tutorial where I have to explain that "MyType myvar" means
something else for function arguments than in local variable or class
field declarations.
If you want to propose that
cdef X x = None
is also disallowed, then that's something else entirely.
Anyway: It's 2 vs. 2 at this point and I don't see anybody changing
sides, so I hope to resign from the discussion at this point.
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev