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.


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to