[New-bugs-announce] [issue16249] unicode name accepts a punctuation glyph

julien tayon report at bugs.python.org
Tue Oct 16 17:32:35 CEST 2012


New submission from julien tayon:

I guess unicode variable names are restricted to letters, and that symbols and punctuation shoud be ignored (except _).

I have tested other dots (punctuation) they dont work. 

Only
http://www.fileformat.info/info/unicode/char/00b7/index.htm
oddly enough has worked so far.


$ python3.2
Python 3.2.3 (default, Sep 10 2012, 18:14:40) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> foo⋅bar=42
  File "<stdin>", line 1
    foo⋅bar=42
            ^
SyntaxError: invalid character in identifier
>>> print(ord("foo⋅bar"[3]))
8901
>>> foo·bar = 42
>>> print(ord("foo·bar"[3]))
183

I have sampled randomly in the same block as MIDDLE DOT and it seems to behave correctly.

----------
components: Interpreter Core
messages: 173049
nosy: julien.tayon
priority: normal
severity: normal
status: open
title: unicode name accepts a punctuation glyph
type: behavior
versions: Python 3.2

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


More information about the New-bugs-announce mailing list