[Python-Dev] Re: Preventing Unicode-related gotchas (Was: pre-PEP: Unicode Security Considerations for Python)

2021年11月02日 22:48:15 -0700

Jim J. Jewett writes:
 > At the time, we considered it, and we also considered a narrower
 > restriction on using multiple scripts in the same identifier, or at
 > least the same identifier portion (so it was OK if separated by
 > _).
This would ban "παν語", aka "pango". That's arguably a good idea
(IMO, 0.9 wink), but might make some GTK/GNOME folks sad.
 > Simplicity won, in part because of existing practice in EMACS
 > scripting, particularly with some Asian languages.
Interesting. I maintained a couple of Emacs libraries (dictionaries
and input methods) for Japanese in XEmacs, and while hyphen-separated
mixtures of ASCII and Japanese are common, I don't recall ever seeing
an identifier with ASCII and Japanese glommed together without a
separator. It was almost always of the form "English verb - Japanese
lexical component". Or do you consider that "relatively complicated"?
 > It might be time for the documentation to mention a specific
 > linter/configuration that does this. It also might be reasonable
 > to do by default in IDLE or even the interactive shell.
It would have to be easy to turn off, perhaps even provide
instructions in the messages. I would guess that for code that uses
it at all, it would be common. So the warnings would likely make
those tools somewhere between really annoying and unusable.
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/FPO3EJISKDZUVMC3RMJJQZIKGCOG35CX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to