Robert Bradshaw wrote: > On Oct 19, 2009, at 5:09 PM, Neal Becker wrote: > >> Lisandro Dalcin wrote: >> >> ... >>> A possible backward way could be to introduce (slightly) new syntax, >>> something like <SomeType??>, i.e using two '?' to indicate a >>> "stronger" type check disallowing None... >> That would be spelled <SomeType?!> >> :) > > Well, or one could use the nonecheck directive. I'd like to avoid > adding more syntax for a problem that'll go away with a smarter > compiler.
+1 I also think that the chance of breaking code with this change is rather small. I can't imagine that many use cases where I would cast a value to a specific extension type other than accessing its C attributes or methods, which would clearly lead to a crash for None values. So however people used this feature before, I expect a None check to be very close in the code. Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
