STINNER Victor added the comment:

Without modifying the language, I guess that it's already technically possible 
to implement that in Python 3 in an application. Using the __prepare__() method 
of a metaclass and a custom dict subclass, I think that you can build what you 
want. I mean that you would have to modify your classes to inherit from a base 
class (which uses the metaclass) and/or use the metaclass everywhere, to catch 
such bug...

I'm not sure that it's worth it. You don't want to have to modify your code to 
catch a single class of kind. Linters exist to check the code without having to 
modify it.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28776>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to