On Monday 16 March 2009 22:52:16 Ralf W. Grosse-Kunstleve wrote:
> [...] Boost.Python 2 was written when the Python bool type still really
> was an int (Python 2.2). [...]

On Tuesday 17 March 2009 06:40:14 Roman Yakovenko wrote:
> Python code:
>
> def foo( arg ):
>     if isinstance( arg, int ):
>          _foo_int( arg )
>     else:
>          _foo_bool( arg )

Now I am confused.  Both of the above read as if a boolean was no longer an 
int, but I interpret "is a" and "isinstance" as checking for types inherited 
from, too?!  While Ralf could have meant (True is 1) with his "really", the 
above code should first test whether isinstance( arg, bool ), no?

Or did this change with 2.6/3?

Greetings,
  Hans
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to