unicode as valid naming symbols

Tim Chase python.list at tim.thechases.com
Mon Mar 31 20:02:57 CEST 2014


On 2014-03-31 11:40, Ian Kelly wrote:
> There is nothing useful
> you can do with a name that is the U+1F4A9 character that you can't
> do just as easily with alphanumeric identifiers like pile_of_poo (or
> куча_фекалий if one prefers; that's auto-translated, so don't blame
> me if it's a poor translation).  The kinds of symbols that we're
> talking about here aren't part of any writing systems, and so to
> incorporate them in *names* as if they were is an abuse of Unicode.

It does get more complex though, when you could have things like

 黄金屎 = "\U0001f4a9"

Like you, I don't expect to ever encounter something like this in the
wild, but they are indeed symbols used in a writing system. :-)

-tkc





More information about the Python-list mailing list