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 Marco Sulla
Recipients Kevin Shweh, Marco Sulla, gvanrossum, jack__d, willingc
Date 2021-08-19.16:21:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1629390089.88.0.65824233314.issue44921@roundup.psfhosted.org>
In-reply-to
Content
Since probably Monica are taking her holidays, I try to decipher her answer.

Probably, the more problematic function spotted by Monica is update_one_slot. I re-quote her sentence:

update_one_slot looks for the parent implementation by trying to find the generated wrapper methods through an MRO search.

dict doesn't have generated wrappers for sq_contains and mp_subscript, because it provides explicit __contains__ and __getitem__ implementations.

Instead of inheriting sq_contains and mp_subscript, update_one_slot ends up giving the subclass sq_contains and mp_subscript implementations that perform an MRO search for __contains__ and __getitem__ and call those. This is much less efficient than inheriting the C slots directly.

The solution for Monica is to change the behaviour of update_one_slot for these cases (no wrappers, C slots directly).

I don't know the implications of this change...
History
Date User Action Args
2021-08-19 16:21:29Marco Sullasetrecipients: + Marco Sulla, gvanrossum, willingc, Kevin Shweh, jack__d
2021-08-19 16:21:29Marco Sullasetmessageid: <1629390089.88.0.65824233314.issue44921@roundup.psfhosted.org>
2021-08-19 16:21:29Marco Sullalinkissue44921 messages
2021-08-19 16:21:29Marco Sullacreate