On 12 July 2010 05:47, Stefan Behnel <stefan...@behnel.de> wrote: > Greg Ewing, 12.07.2010 10:34: >> Stefan Behnel wrote: >> >>> My point was more why people currently don't run into it and why I think >>> there is a difference to a boolean type. >> >> Well, it seems to me the reason people don't run into it >> is just as likely to be simply that it never occurs to >> anyone to try to type something as a Python int in the >> first place. And, for the same reasons, they're not >> likely to want to type anything as a Python bool either. > > Ok, then we're back to this: > > """ > we may consider *always* > mapping 'bool' to the native boolean type in the target language. Python's > 'bool' type is compatible with integers anyway, so we could map 'bool' to > a 0/1 restricted bint in C and bool in C++ (assuming appropriate coercion > semantics for C++/Python). > """ >
What about C99 _Bool ? I think we are going to need a #define for Cython's C-side bool. -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169 _______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev