unicode as valid naming symbols

Antoon Pardon antoon.pardon at rece.vub.ac.be
Thu Mar 27 05:36:02 EDT 2014


On 26-03-14 17:37, Ian Kelly wrote:
> On Wed, Mar 26, 2014 at 2:52 AM, Antoon Pardon
> <antoon.pardon at rece.vub.ac.be> wrote:
>> Of course we don't have to follow mathematical convention with python. However allowing any
>> unicode symbol as an identifier doesn't prohibit from using √ as an operator. We do have
>> "in" and "is" as operators now, even if they would otherwise be acceptable identifiers.
>> So I wonder, would you consider to introduce log as an operator. 2 log x seems an interesting
>> operation for a programmer.
> If it's going to become an operator, then it has to be a keyword.
> Changing a token that is currently allowed to be an identifier into a
> keyword is generally avoided as much as possible, because it breaks
> backward compatibility.  "in" and "is" have both been keywords for a
> very long time, perhaps since the initial release of Python.

I know, for such a reason I would love it if keywords would have been
written like this: 𝗱𝗲𝗳 (using mathematical bold) instead of just like
this: def (using plain latin letters). It would mean among other things
we could just write operator.not instead of having to write operator.not_

-- 
Antoon Pardon




More information about the Python-list mailing list