unicode as valid naming symbols

Ian Kelly ian.g.kelly at gmail.com
Mon Mar 31 14:10:44 EDT 2014


On Mon, Mar 31, 2014 at 12:02 PM, Tim Chase
<python.list at tim.thechases.com> wrote:
> 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. :-)

That's already a legal identifier, though.  The constituent ideographs
are categorized as "Letter, Other", not symbols.



More information about the Python-list mailing list