On 12 April 2010 11:34, Dag Sverre Seljebotn <[email protected]> wrote: > Lisandro Dalcin wrote: >> On 12 April 2010 04:10, Stefan Behnel <[email protected]> wrote: >>> Gregory Ewing, 12.04.2010 02:31: >>> >>>> * Preparation is being made for making 'not None' the >>>> default for extension type parameters to Python functions. >>> I agree that this has been a source of bugs in the past, so I'm not >>> generally opposed to this. I really dislike breaking existing code, but I >>> would expect that this is only a minor source of trouble for users. I'm >>> +0.3 for such a change in Cython. >>> >> >> Big +1 from my side. About code breakages: Cython could use a compiler >> directive for this in order to get the old behavior. > > I guess I should repeat my big -1 for this then. > > I think Java-like behaviour is much more appropriate (i.e. raise proper > exceptions in the code using the variable, but allow None as a value). > > Let's not break the language forever just because nobody has time to > implement control flow analysis now. >
Would you accept a directive to ENABLE automatic "not None"? -- Lisandro Dalcin --------------- 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
