unicode as valid naming symbols

Rustom Mody rustompmody at gmail.com
Thu Mar 27 11:10:08 EDT 2014


On Thursday, March 27, 2014 3:06:02 PM UTC+5:30, Antoon Pardon wrote:
> On 26-03-14 17:37, Ian Kelly wrote:
> > On Wed, Mar 26, 2014 at 2:52 AM, Antoon Pardon
> >> 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_

Just out of curiosity how do/did you type that?
When I see an exotic denizen from the unicode-universe I paste it into
emacs and ask "Who are you?"

But with your 'def' my emacs is going a bit crazy!



More information about the Python-list mailing list