This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 08 value popups an stdin error, no date handle allowed
Type: compile error Stage:
Components: Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: QuantumTim, pgimelli
Priority: normal Keywords:

Created on 2008-10-03 16:43 by pgimelli, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg74258 - (view) Author: patricio (pgimelli) Date: 2008-10-03 16:43
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)
msg74259 - (view) Author: Tim Gordon (QuantumTim) Date: 2008-10-03 16:58
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
>
>
msg74260 - (view) Author: Tim Gordon (QuantumTim) Date: 2008-10-03 17:00
Whoops, I thought the tracker automatically removed quoted text! :z
History
Date User Action Args
2022-04-11 14:56:40adminsetgithub: 48281
2008-10-03 17:04:49amaury.forgeotdarcsetstatus: open -> closed
resolution: not a bug
2008-10-03 17:00:50QuantumTimsetmessages: + msg74260
2008-10-03 16:58:53QuantumTimsetnosy: + QuantumTim
messages: + msg74259
2008-10-03 16:43:43pgimellicreate