[Python-ideas] Crazy idea: allow keywords as names in certain positions

Greg Ewing greg.ewing at canterbury.ac.nz
Tue May 15 05:51:20 EDT 2018


Ethan Furman wrote:
> Part of the point of the proposal is to be able to use existing keywords 
> (at least, I thought it was).

Mainly it's so that *new* keywords can be added to the language
without breaking old code. Nobody is going to want to turn one
of the currently existing keywords into a name.

However, it might be desirable for calling APIs of another
language which has a different set of keywords. Personally
I don't really care if "from foreignlib import and" works
and clobbers the "and" operator for the rest of the module.
I was just suggesting a milder version of the feature that
some people might be more comfortable with.

-- 
Greg


More information about the Python-ideas mailing list