[New-bugs-announce] [issue12127] Inconsistent leading zero treatment

Peter Wentworth report at bugs.python.org
Fri May 20 06:19:44 CEST 2011


New submission from Peter Wentworth <p.wentworth at ict.ru.ac.za>:

In Python 3 we no longer have octal literals. The assignment
x = 0050  
gives an invalid token error.

But the assignment
y = int("0050") assigns the value 50 to y.

I would advocate consistency in the two situations, and prefer that leading zeros should be permitted on numbers.

----------
components: Interpreter Core
messages: 136352
nosy: Peter.Wentworth
priority: normal
severity: normal
status: open
title: Inconsistent leading zero treatment
type: compile error
versions: Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12127>
_______________________________________


More information about the New-bugs-announce mailing list