On 6/5/07, Stephen J. Turnbull <[EMAIL PROTECTED]> wrote:
> I'd love to get rid of full-width ASCII and halfwidth kana (via
> compatibility decomposition).

If you do forbid compatibility characters in identifiers, then they
should be flagged as an error, not converted silently. NFC, on the
other hand, should be applied silently. The reason is that character
equivalence is the same thing as binary equivalence of the NFC form in
Unicode, and adding extra equivalences (whether it's "FoO" == "foo",
"カキ" == "カキ" or "A123" == "A123") is surprising.

In short, I would like this function to return 'OK' or be a
syntax error, but it should not fail or return something else:

def test():
    if 'A' == 'A': return 'OK'
    A = 'O'
    A = 'K' # as tested above, 'A' and 'A' are not the same thing
    return locals()['A']+locals()['A']

Note that 'A' == 'A' should be false (no automatic NFKC for strings,
please).
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to