Message74259
By prefixing a number with 0, you're actually using octal rather than
decimal (i.e., only digits 0 to 7 are valid). For example, try:
>>> print 030
24
>>> print 077
63
patricio wrote:
> New submission from patricio <patriciogimelli@yahoo.com.ar>:
>
> a = 08
> print a
> File"<stdin>",line 1
> a = 08
> <
> syntax error:invalid token
>
> (if I use 07, the 0 is supressed but it compiles & display the 7)
>
> ----------
> messages: 74258
> nosy: pgimelli
> severity: normal
> status: open
> title: 08 value popups an stdin error, no date handle allowed
> type: compile error
> versions: Python 2.5
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue4031>
> _______________________________________
> _______________________________________________
> New-bugs-announce mailing list
> New-bugs-announce@python.org
> http://mail.python.org/mailman/listinfo/new-bugs-announce
>
> |
|
Date |
User |
Action |
Args |
2008-10-03 16:58:54 | QuantumTim | set | recipients:
+ QuantumTim, pgimelli |
2008-10-03 16:58:53 | QuantumTim | link | issue4031 messages |
2008-10-03 16:58:53 | QuantumTim | create | |
|