commit | 0668c62677e76b2acf7e4d11d5e9c1f4420a54f1 | [log] [tgz] |
---|---|---|
author | Antoine Pitrou <solipsis@pitrou.net> | Tue Aug 26 22:42:08 2008 +0000 |
committer | Antoine Pitrou <solipsis@pitrou.net> | Tue Aug 26 22:42:08 2008 +0000 |
tree | 0d6001ed47c5e6f715996eb2fc7e512d8c7a2de7 | |
parent | 14cb6bcf2ba953735ec1ef622f8ff8e23db1f326 [diff] |
Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to match Python 2.5 speed despite the __instancecheck__ / __subclasscheck__ mechanism. In the process, fix a bug where isinstance() and issubclass(), when given a tuple of classes as second argument, were looking up __instancecheck__ / __subclasscheck__ on the tuple rather than on each type object. Reviewed by Benjamin Peterson and Raymond Hettinger.