FutureWarning

Peter Hansen peter at engcorp.com
Fri Dec 24 16:10:38 CET 2004


Egor Bolonev wrote:
> =================
> C:\Documents and Settings\┼уюЁ\My  
> Documents\Scripts\octopus_eye\1\oct_eye_db.py:
> 213: FutureWarning: hex()/oct() of negative int will return a signed  
> string in P
> ython 2.4 and up
>   if hex(binascii.crc32(data))[0] == '-':
> =================
> hex() will return numbers like -0xa1?

Python 2.4 is out already, so it's easy to check:

c:\>python
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> hex(-55)
'-0x37'

-Peter



More information about the Python-list mailing list