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: Bug in eval() function
Type: compile error Stage:
Components: Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: arunkumarrajan, loewis
Priority: normal Keywords:

Created on 2007-11-23 04:40 by arunkumarrajan, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg57769 - (view) Author: Arunkumar (arunkumarrajan) Date: 2007-11-23 04:40
PythonWin 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit 
(Intel)] on win32.
Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' 
for further copyright information.
>>> 
>>> 
>>> eval("02*2")
4
>>> 
>>> eval("08*2")
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "<string>", line 1
    08*2
     ^
SyntaxError: invalid token
>>> eval("09*2")
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "<string>", line 1
    09*2
     ^
SyntaxError: invalid token
>>> 
>>> 
>>> eval("07*2")
14
>>> 
>>> eval("010*2")
16
>>> eval("9*2")
18
>>>
msg57771 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-11-23 08:11
Why do you think this is a bug? 08 really is a syntax error, and 010
really means 8.
History
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45831
2007-11-23 08:11:53loewissetstatus: open -> closed
resolution: not a bug
messages: + msg57771
nosy: + loewis
2007-11-23 04:40:30arunkumarrajancreate