Issue #2534: speed up isinstance() and issubclass() by 50-70%, so as to
commit8077a5e0c5cffd6c32b71a32f9eb7980a45d4ef0
authorantoine.pitrou <antoine.pitrou@6015fed2-1504-0410-9fe1-9d1591cc4771>
Tue, 26 Aug 2008 22:42:08 +0000 (26 22:42 +0000)
committerantoine.pitrou <antoine.pitrou@6015fed2-1504-0410-9fe1-9d1591cc4771>
Tue, 26 Aug 2008 22:42:08 +0000 (26 22:42 +0000)
tree8df2fe2f853c66b9a751f0d9dc4161328c1dfa5c
parent346aaff18d8acd75c54fbea75c0911471f37a531
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.

git-svn-id: http://svn.python.org/projects/python/trunk@66043 6015fed2-1504-0410-9fe1-9d1591cc4771
Include/abstract.h
Lib/test/test_abc.py
Lib/test/test_exceptions.py
Lib/test/test_typechecks.py
Misc/NEWS
Objects/abstract.c
Objects/typeobject.c
Python/errors.c