Ezio Melotti <ezio.melo...@gmail.com> added the comment: Do you have any use case for x = 0050? I don't any reason to adding leading 0s to a literal, but with int() the situation is different because you might get string with leading 0s from somewhere else. Also note that the int() function is more flexible and there are other similar "inconsistencies":
>>> x = int('12') >>> x 12 >>> x = 12 File "<stdin>", line 1 x = 12 ^ SyntaxError: invalid character in identifier I suggest closing this as "rejected". ---------- nosy: +ezio.melotti, rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12127> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com