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 serhiy.storchaka
Recipients eric.snow, python-dev, rhettinger, serhiy.storchaka
Date 2015-10-20.16:03:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1445357027.71.0.347642519592.issue25410@psf.upfronthosting.co.za>
In-reply-to
Content
Thank you for your reviews and discussions (and for your appreciated C acceleration of OrderedDict of course) Eric. I just want to make the code a little cleaner and reliable.

As for odict_type.patch, I would prefer to commit only C part of the patch and left Python implementation unchanged. There few not very strong arguments for __class__ against type() in Python code.

1. Calling type() needs to make globals and builtins lookup. This is more than 2 times slower than access the __class__ attribute. Not critical for __repr__(), __reduce__() and copy().

2. If the code is invoked at shutdown after destroying the builtins module, type can be None. We already had issues with this in the past. In current Python such situation is almost impossible nevertheless, due to different defensive techniques.
History
Date User Action Args
2015-10-20 16:03:47serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, python-dev, eric.snow
2015-10-20 16:03:47serhiy.storchakasetmessageid: <1445357027.71.0.347642519592.issue25410@psf.upfronthosting.co.za>
2015-10-20 16:03:47serhiy.storchakalinkissue25410 messages
2015-10-20 16:03:47serhiy.storchakacreate