"Duncan Booth" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | [EMAIL PROTECTED] wrote under the subject line "Is this a | bug in int()?": | >>>>int('0x', 16) | > 0 | > | I think it is a general problem in the tokenizer, not just the 'int' | constructor. The syntax for integers says: | | hexinteger ::= "0" ("x" | "X") hexdigit+ | | but 0x appears to be accepted in source code as an integer. | | If I were you, I'd try reporting it as a bug.
The mismatch between doc and behavior certainly is a bug. One should change. -- http://mail.python.org/mailman/listinfo/python-list