[New-bugs-announce] [issue7260] SyntaxError with a not-existing offset for unicode code

Noam Raphael report at bugs.python.org
Wed Nov 4 08:04:59 CET 2009


New submission from Noam Raphael <noamraph at gmail.com>:

Hello,

This is from the current svn:

> ./python
Python 3.2a0 (py3k:76104, Nov  4 2009, 08:49:44) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
... 	eval("u'שלום'")
... except SyntaxError as e:
... 	e
... 
SyntaxError('invalid syntax', ('<string>', 1, 11, "u'שלום'"))

As you can see, the offset (11) refers to a non-existing character, as
the code contains only 7 characters.

Thanks,
Noam

----------
components: Interpreter Core
messages: 94879
nosy: noam
severity: normal
status: open
title: SyntaxError with a not-existing offset for unicode code
versions: Python 3.2

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


More information about the New-bugs-announce mailing list