Future Warning with Negative Int
brianlum at gmail.com
brianlum at gmail.com
Fri Apr 14 07:01:11 EDT 2006
Hi,
If I try to print a negative integer as a hexadecimal, I get the
following error:
FutureWarning: %u/%o/%x/%X of negative int will return a signed string
in Python 2.4 and up
For example:
>>> print "%X" % -1
__main__:1: FutureWarning: %u/%o/%x/%X of negative int will return a
signed string in Python 2.4 and up
FFFFFFFF
Does that mean that in the future it will say -1 or -FFFFFFFF? Also,
how do I suppress this warning?
Thanks,
Brian
More information about the Python-list
mailing list