[issue10928] Strange input processing

2011-01-17 Thread Kirill Bystrov

New submission from Kirill Bystrov kirrb...@gmail.com:

I have written a simple script which evaluates some numeric expressions and 
faced a strange problem at some point. Some of these expressions cannot 
evaluate correctly. Here is an example:
Python 2.7.1+ (r271:86832, Dec 24 2010, 10:03:35) 
[GCC 4.5.2] on linux2
Type help, copyright, credits or license for more information.
 3158 + 04
3162
 3158 + 05
3163
 3158 + 06
3164
 3158 + 07
3165
 3158 + 08
  File stdin, line 1
3158 + 08
^
SyntaxError: invalid token
 3158 + 09
  File stdin, line 1
3158 + 09
^
SyntaxError: invalid token
 
Both 2.6 and 2.7 raise this exception. My distro is Ubuntu Natty if this 
matters.
P.S.: sorry for my bad English :)

--
components: Interpreter Core
messages: 126411
nosy: byss
priority: normal
severity: normal
status: open
title: Strange input processing
type: behavior
versions: Python 2.6, Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10928
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10928] Strange input processing

2011-01-17 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

08 is an invalid octal literal.  See

http://docs.python.org/reference/lexical_analysis.html#integer-and-long-integer-literals

--
nosy: +r.david.murray
resolution:  - invalid
stage:  - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10928
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10928] Strange input processing

2011-01-17 Thread Kirill Bystrov

Kirill Bystrov kirrb...@gmail.com added the comment:

Sorry, i have really forgotten about these octals.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10928
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com