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

Steven D'Aprano steve at pearwood.info
Tue May 15 07:51:09 EDT 2018

On Mon, May 14, 2018 at 01:28:51PM +1200, Greg Ewing wrote:

> Redefining the existing keywords could perhaps be forbidden
> if you really want to protect people from shooting themselves
> in the kidneys this particular way.

So instead of having two classes of identifiers

- those that can be used anywhere;
- those that can only be used as dotted names;

you would have two classes of keywords:

- those that cannot be shadowed;
- those that can be shadowed.


More information about the Python-ideas mailing list