[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. > I'm working on a tokenizer and I'm thinking about returning a > MALFORMED_NUMBER token (1.2E, .5E+) > Why would you return a token rather than throwing an exception? -- http://mail.python.org/mailman/listinfo/python-list