[python-win32] Boolean type changed in Python 3.0?

Roger Upole rwupole at msn.com
Wed Jan 6 09:58:30 CET 2010


>From looking at the source of 
PyCom_VariantFromPyObject in oleargs.cpp, 
the check for a boolean is done after the check for
an int.  PyLong_Check is used to determine
if the object should be converted to one of the variant
integer types.  Apparently in Python 3.x, this now returns
True for a boolean whereas it doesn't in 2.x.  We
should be able to just move the boolean check above
the int check without breaking anything in 2.x.


       Roger




More information about the python-win32 mailing list