Dealing with hex

Matt Gerrans mgerrans at
Wed Dec 10 04:49:16 CET 2003

Is there an ideal approach to dealing with the FutureWarning about getting
the hex value of a negative int?    I'm using zlib.crc32() which can return
a negative 32-bit int value, so for example print '%x' % zlib.crc32(
buffer ) generates the FutureWarning.    I know I could jump through hoops
to coerce the int into a long that will have the same CRC, but is there some
particular recomendation for this (I looked at PEP 237, but there wasn't a

More information about the Python-list mailing list