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 jack__d
Recipients Marco Sulla, jack__d
Date 2021-08-16.01:36:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629077769.74.0.467759675239.issue44921@roundup.psfhosted.org>
In-reply-to
Content
There was a thorough discussion about the concerns associated with supporting dict subclasses in general here: bpo-32615

If I understand correctly, allowing dict subclasses to inherit __contains__ and __getitem__ will be a step towards supporting dict subclasses in a more broad context, like being able to use them as namespaces passed to exec. 

Ultimately, dictionaries are at the very heart of Cpython's implementation. I think it is reasonable to say that it is not possible or reasonable to support users in creating custom dict implantation with their own behavior. There is no good real world use case for it (please tell me if anyone has one), and it opens the door to enormous unnecessary complexity. 

Also related to dict subclassing:
bpo-15099
bpo-27561

Marco, I hope that the discussions I've linked will at least make it clear why cpython behaves this way, and what the concerns are especially around supporting user subclasses of dict. I noticed you tagged this bpo as performance, but there are significant negative performance implications around dict subclasses that you'll see in past discussions.

With this additional context in mind, what changes do you propose?
History
Date User Action Args
2021-08-16 01:36:09jack__dsetrecipients: + jack__d, Marco Sulla
2021-08-16 01:36:09jack__dsetmessageid: <1629077769.74.0.467759675239.issue44921@roundup.psfhosted.org>
2021-08-16 01:36:09jack__dlinkissue44921 messages
2021-08-16 01:36:09jack__dcreate