summaryrefslogtreecommitdiffstats
path: root/Lib/abc.py
Commit message (Collapse)AuthorAgeFilesLines
* keep UserDict an old-style classBenjamin Peterson2010-06-221-1/+3
| | | | Be generous in abc.py to allow this.
* #7624: Fix isinstance(foo(), collections.Callable) for old-style classes.Florent Xicluna2010-03-081-0/+8
|
* raise a clear TypeError when trying to register a non-classBenjamin Peterson2010-01-271-1/+1
|
* Fix typos.Walter Dörwald2009-05-041-2/+2
|
* Fix 3k-style metaclass syntax in docstrings.Georg Brandl2009-02-281-3/+6
|
* Issue 3747: Fix caching in ABCMeta.__subclasscheck__ (R: Georg Brandl)Nick Coghlan2008-09-021-2/+2
|
* Make isinstance(OldstyleClass, NewstyleClass) return False instead of raisingJeffrey Yasskin2008-03-171-5/+5
| | | | an exception. Issue reported by Joseph Armbruster.
* Move abc._Abstract into object by adding a new flag Py_TPFLAGS_IS_ABSTRACT,Jeffrey Yasskin2008-02-281-48/+1
| | | | | | | | which forbids constructing types that have it set. The effect is to speed ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__ = abc.ABCMeta' 'Foo()' up from 2.5us to 0.201us. This fixes issue 1762.
* Working on issue #1762: BroughtJeffrey Yasskin2008-02-131-2/+14
| | | | | | | | ./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-1/+1
| | | | ABCs.
* Backport of _abccoll.py by Benjamin Arangueren, issue 1383.Guido van Rossum2007-11-221-1/+1
| | | | 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/+206
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.