On Wed, Aug 25, 2010 at 1:11 AM, Stefan Behnel <stefan...@behnel.de> wrote:
> Craig Citro, 25.08.2010 10:00:
>> It is with *great* pleasure that I email to announce the release of
>> Cython version 0.13!
>
> Yay! :)

Wohoo! Now onto 0.13.1.

>>   * bool is no longer a valid type name by default. The problem is that
>> it's not clear whether bool should refer to the Python type or the C++
>> type, and expecting one and finding the other has already led to
>> several hard-to-find bugs. Both types are available for importing: you
>> can use from cpython cimport bool for the Python bool type, and from
>> libcpp cimport bool for the C++ type.
>
> Reading this, I noticed that cimporting 'bool' will break valid Python code
> like "bool(some_pyvalue)". However, given that the Python 'bool' type is so
> rarely used as a type declaration (mostly because Python's boolean coercion
> features are much too powerful to restrict values to True/False), I don't
> think this will pose problems in real life.

Cimporting bool from stdcpp will break this, but cimporting it from
cpython will bring back the old behavior including bool(some_value)
still working. What should work is cimporting bool from stdcpp and
doing <bool>some_value.

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

Reply via email to