FutureWarning

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Egor Bolonev

    #1

    FutureWarning

    =============== ==
    C:\Documents and Settings\ŠÕÀ³\M y
    Documents\Scrip ts\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.cr c32(data))[0] == '-':
    =============== ==
    hex() will return numbers like -0xa1?
  • Peter Hansen

    #2
    Re: FutureWarning

    Egor Bolonev wrote:[color=blue]
    > =============== ==
    > C:\Documents and Settings\ŠÕÀ³\M y
    > Documents\Scrip ts\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.cr c32(data))[0] == '-':
    > =============== ==
    > hex() will return numbers like -0xa1?[/color]

    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.[color=blue][color=green][color=darkred]
    >>> hex(-55)[/color][/color][/color]
    '-0x37'

    -Peter

    Comment

    Working...