Greg Ewing, 25.08.2010 12:54:
>> Craig Citro, 25.08.2010 10:00:
>>
>>>   * bool is no longer a valid type name by default. ...
>   >  Both types are available for importing:
>
> What happened to the idea of treating bool like int?

That's orthogonal. The case of 'bool' as a type only applies to type 
declarations and doesn't work "as expected" when dealing with C++ code 
because some users expect the C++ 'bool' type and others expect the Python 
type. Thus, 'bool' was removed as a Cython type and you have to be explicit 
about what you use.

There are two places where 'bool' values are treated as ints: the literals 
True/False are treated as ints (or 'bint', actually), and users can declare 
variables as 'bint' explicitly. Both work nicely and match well with the 
'bool' use cases.

Stefan
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to