diff options
author | Jeffrey Yasskin <jyasskin@gmail.com> | 2008-02-28 04:45:36 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@gmail.com> | 2008-02-28 04:45:36 +0000 |
commit | 960b9b7a2f6e9b4f0e6b692d604c53b3fd2f5d1c (patch) | |
tree | 9f0cc6bac83e4c2607c6bea64249932fc5353859 /Lib/test/test_descrtut.py | |
parent | c105289ec4e22f5d53f3e5872ad6a49da8a33b6d (diff) | |
download | cpython-git-960b9b7a2f6e9b4f0e6b692d604c53b3fd2f5d1c.tar.gz |
Move abc._Abstract into object by adding a new flag Py_TPFLAGS_IS_ABSTRACT,
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.
Diffstat (limited to 'Lib/test/test_descrtut.py')
-rw-r--r-- | Lib/test/test_descrtut.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_descrtut.py b/Lib/test/test_descrtut.py index 94e984585c..514e398787 100644 --- a/Lib/test/test_descrtut.py +++ b/Lib/test/test_descrtut.py @@ -209,6 +209,7 @@ Instead, you can get the same information from the list type: '__setitem__', '__setslice__', '__str__', + '__subclasshook__', 'append', 'count', 'extend', |