[Python-ideas] Support Unicode code point notation

Alexander Belopolsky alexander.belopolsky at gmail.com
Fri Aug 2 02:17:14 CEST 2013


On Thu, Aug 1, 2013 at 8:04 PM, Bruce Leban <bruce at leapyear.org> wrote:

> I'm +/-0 on having 'control-' and 'reserved-' etc. simply being different
> spellings of 'U+' so that '\N{control-0021}' == '\N{U+0021}' == '\x21' ==
> '!' even though that isn't a control character.


This misses the point of adding the code point type prefix.  If you
fat-finger \N{control-0021} instead of intended \N{control-0012} you would
want a quick syntax error rather than an obscure bug.  Similarly, when you
are reading someone else's code, you don't want to consult the code table
every time you see \N{control-NNNN} to assure that this is really a control
character rather than a surrogate- or private-use- one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130801/ee3ddafc/attachment-0001.html>


More information about the Python-ideas mailing list