[Python-ideas] Support Unicode code point labels (Was: notation)

Stephen J. Turnbull stephen at xemacs.org
Sat Aug 3 16:35:32 CEST 2013


Alexander Belopolsky writes:

 > Yet, I still don't see the problem.

 > You can already write
 >     assert unicodedata.category(chr(0x50000)) ==  > 'Cn'
 > in your code and this will blow up in any future version that
 > will use UCD with U+50000 assigned.

That's not a problem.  As you say, "presumably you're doing that for
good reason."

The problem is that someone will use code written by someone using a
future version and run it with a past version, and the assert will
trigger.  I don't see any good reason why it should.  The Unicode
Standard explicitly specifies how unknown code points should be
handled.  Raising an exception is not part of that spec.



More information about the Python-ideas mailing list