summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_abc.py
Commit message (Collapse)AuthorAgeFilesLines
* Make isinstance(OldstyleClass, NewstyleClass) return False instead of raisingJeffrey Yasskin2008-03-171-0/+11
| | | | an exception. Issue reported by Joseph Armbruster.
* Since abc._Abstract was replaces by a new type flags the regression test ↵Christian Heimes2008-03-031-0/+5
| | | | suite fails. I've added a new function inspect.isabstract(). Is the mmethod fine or should I check if object is a instance of type or subclass of object, too?
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+0
|
* Working on issue #1762: BroughtJeffrey Yasskin2008-02-131-0/+10
| | | | | | | | ./python.exe -m timeit -s 'from fractions import Fraction; f = Fraction(3, 2)' 'isinstance(3, Fraction); isinstance(f, Fraction)' from 12.3 usec/loop to 3.44 usec/loop and ./python.exe -m timeit -s 'from fractions import Fraction' 'Fraction(3, 2)' from 48.8 usec to 23.6 usec by avoiding genexps and sets in __instancecheck__ and inlining the common case from __subclasscheck__.
* Fix issue 1747: allow classic classes to be checked for being subclasses ofJeffrey Yasskin2008-01-071-4/+11
| | | | ABCs.
* Backport of _abccoll.py by Benjamin Arangueren, issue 1383.Guido van Rossum2007-11-221-0/+14
| | | | With some changes of my own thrown in (e.g. backport of r58107).
* Patch # 1026 by Benjamin Aranguren (with Alex Martelli):Guido van Rossum2007-09-101-0/+142
Backport abc.py and isinstance/issubclass overloading to 2.6. I had to backport test_typechecks.py myself, and make one small change to abc.py to avoid duplicate work when x.__class__ and type(x) are the same.