This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients inglesp, r.david.murray, vstinner
Date 2016-11-22.21:04:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1479848665.61.0.864546498274.issue28776@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-11-22 21:04:25vstinnersetrecipients: + vstinner, r.david.murray, inglesp
2016-11-22 21:04:25vstinnersetmessageid: <1479848665.61.0.864546498274.issue28776@psf.upfronthosting.co.za>
2016-11-22 21:04:25vstinnerlinkissue28776 messages
2016-11-22 21:04:25vstinnercreate