Serhiy Storchaka added the comment:

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.

----------

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

Reply via email to