[issue22667] Incorrect evaluation of variables with names containing supplementary characters

2014-10-22 Thread Drekin

Drekin added the comment:

I understand. I have found 
https://mail.python.org/pipermail/python-3000/2007-May/007995.html as a reason 
for using NFKC rather than NFC. On the other hand I think one may want these 
double-struct mathematical letters to be different from the ordinary ones if 
used as variable names. So I wonder if there are some other reasons for 
choosing NFKC over NFC.

--

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



[issue22667] Incorrect evaluation of variables with names containing supplementary characters

2014-10-22 Thread STINNER Victor

STINNER Victor added the comment:

 So I wonder if there are some other reasons for choosing NFKC over NFC.

In fact, there is a whole PEP:

http://legacy.python.org/dev/peps/pep-3131/

I see Which normalization form should be used, NFC or NFKC? without answer, 
sorry.

I guess that NFKC avoids confusion when you use a font where two different 
characters have the same glyph or a very similer glyph.

--

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



[issue22667] Incorrect evaluation of variables with names containing supplementary characters

2014-10-22 Thread Benjamin Peterson

Benjamin Peterson added the comment:

The unicode standard explains some of the tradeoffs.
http://www.unicode.org/reports/tr31/tr31-21.html#normalization_and_case

On Wed, Oct 22, 2014, at 07:42, Drekin wrote:
 
 Drekin added the comment:
 
 I understand. I have found
 https://mail.python.org/pipermail/python-3000/2007-May/007995.html as a
 reason for using NFKC rather than NFC. On the other hand I think one may
 want these double-struct mathematical letters to be different from the
 ordinary ones if used as variable names. So I wonder if there are some
 other reasons for choosing NFKC over NFC.
 
 --
 
 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue22667
 ___

--

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



[issue22667] Incorrect evaluation of variables with names containing supplementary characters

2014-10-18 Thread Drekin

New submission from Drekin:

 eval(\N{mathematical double-struck capital a})
NameError: name 'A' is not defined
 A = 2
 eval(\N{mathematical double-struck capital a})
2
 \N{mathematical double-struck capital a} == A
False

--
components: Interpreter Core, Unicode
messages: 229653
nosy: Drekin, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: Incorrect evaluation of variables with names containing supplementary 
characters
versions: Python 3.4, Python 3.5

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



[issue22667] Incorrect evaluation of variables with names containing supplementary characters

2014-10-18 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Identifier names are normalized.

 unicodedata.normalize(NFKC, \N{mathematical double-struck capital a}) 
 == A
True

--
nosy: +benjamin.peterson
resolution:  - not a bug
status: open - closed

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