On Mon, Jul 15, 2019 at 01:34:02PM +0200, Adrien Ricocotam wrote: > Hi all, > What would you think if we could write our code using unicode ? > It would be especially useful for scientific programming (we could use the > greek letters),
We've been able to do that since about 2007. https://www.python.org/dev/peps/pep-3131/ In the future, before making suggestions for new features, you should do some research into what is already possible, and whether it has already been suggested before: https://duckduckgo.com/?q=python+unicode+identifiers > it could also be nice to use emojis for some variables. I doubt that. Variable names should be meanigful, not "smiley face" or "eggplant". > I don't see any bad consequences (1) For many people, it is very difficult to type non-ASCII identifiers in their editors. (2) For many people, support for many non-ASCII identifiers is poor. They will see a series of boxes, something like this: = .(, ) (3) Unicode allows us to play games like this: py> А = 1 py> print(А) 1 py> A = 2 py> print(A) 2 py> Α = 3 py> print(Α) 3 py> Α - 1 == А + 1 True Do you see what I did there? (4) Not only are confusables, well, confusing, but they can be used for phishing and other attacks. http://unicode.org/reports/tr36/tr36-8.html Of course there are ASCII confusables too, such as O 0 and I l (depending on the font you use) but Unicode adds hundreds of confusables. -- Steven _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/HF33MHP32QJ3NGSJGKYYYSUDQEBLBQID/ Code of Conduct: http://python.org/psf/codeofconduct/