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

2021年11月02日 22:30:21 -0700

Serhiy Storchaka writes:
 > All control characters except CR, LF, TAB and FF are banned outside
 > comments and string literals. I think it is worth to ban them in
 > comments and string literals too.
+1
 > > For homoglyphs/confusables, should there be a SyntaxWarning when an
 > > identifier looks like ASCII but isn't?
 > 
 > It would virtually ban Cyrillic.
+1 (for the comment and for the implied -1 on SyntaxWarning, let's
keep the Cyrillic repertoire in Python!)
 > It is a work for linters,
+1
Aside from the reasons Serhiy presents, I'd rather not tie
this kind of rather ambiguous improvement in Unicode handling to the
release cycle.
It might be worth having a pep9999 module/script in Python (perhaps
more likely, PyPI but maintained by whoever does the work to make
these improvements + Petr or somebody Petr trusts to do it), that
lints scripts specifically for confusables and other issues.
Steve
_______________________________________________
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/Z62GMKAJLHZJD3YSEOJKKBWUZSBYEIVA/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to