N
Nick Coghlan
<Sorry for the disconnected reply -I've been having news server issues, and just
switched to the mailing list instead>
A quick check of the source code reveals that this behaviour is deliberate.
There is apparently an issue with the corner case breaking badly (potentially
raising an exception) on some platforms. So, Python plays it safe and converts
the two boundary cases to Python longs instead of Python ints.
See the code for the gory details (the relevant function is 'float_int'):
http://cvs.sourceforge.net/viewcvs....c/Objects/floatobject.c?rev=2.134&view=markup
Cheers,
Nick.
switched to the mailing list instead>
A quick check of the source code reveals that this behaviour is deliberate.
There is apparently an issue with the corner case breaking badly (potentially
raising an exception) on some platforms. So, Python plays it safe and converts
the two boundary cases to Python longs instead of Python ints.
See the code for the gory details (the relevant function is 'float_int'):
http://cvs.sourceforge.net/viewcvs....c/Objects/floatobject.c?rev=2.134&view=markup
Cheers,
Nick.