Dag Sverre Seljebotn wrote: > Lisandro Dalcin wrote: >> On Wed, Aug 20, 2008 at 9:28 PM, Greg Ewing >> <[EMAIL PROTECTED]> >> wrote: >>> Speaking of that, I've been thinking for a while now >>> about making "not None" the default, and requiring >>> "or None" to specify that None is an acceptable >>> parameter value. >> >> Definitely +1 for me. >> >>> Having seen a number of pieces of Pyrex code that >>> were susceptible to being crashed because "not None" >>> wasn't used where it should have been, I think >>> this would be a safer default. >> >> Indeed. My own code suffered for this flaw, I realized about this >> Cython behavior reading the generated C code, and then I went to the >> docs to comfirm this. Up to now, I'm not yet completelly sure that all >> my code is free of "None" crashes. >> >>> The change may >>> break some existing code, though. >> >> Yes, but surely is will make others codes to become correct. > > But it does it by making a hard restriction on what kind of code you can > write -- I'd like to be able to pass None to functions (in a safe manner), > not just disable the feature.
I meant: Not just disable the feature by default so that I have to write "MyClass or None". Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
