diff options
author | Guido van Rossum <guido@python.org> | 2007-09-11 20:42:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-09-11 20:42:30 (GMT) |
commit | 894d35ea61c24c09f5d8d15683904d6aba27fab4 (patch) | |
tree | d9e0eab97d665641d033be88d5cc7cfe5112d6c0 /Lib/abc.py | |
parent | 1ba3114fdb5adb5e6852c85e1d3caccba3395471 (diff) | |
download | cpython-894d35ea61c24c09f5d8d15683904d6aba27fab4.zip cpython-894d35ea61c24c09f5d8d15683904d6aba27fab4.tar.gz cpython-894d35ea61c24c09f5d8d15683904d6aba27fab4.tar.bz2 |
Thomas Wouters pointed out that _Abstract.__new__ should use super().__new__()
instead of going straight to object.__new__().
Diffstat (limited to 'Lib/abc.py')
-rw-r--r-- | Lib/abc.py | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -56,8 +56,6 @@ class _Abstract(object): """Helper class inserted into the bases by ABCMeta (using _fix_bases()). You should never need to explicitly subclass this class. - - There should never be a base class between _Abstract and object. """ def __new__(cls, *args, **kwds): @@ -69,7 +67,7 @@ class _Abstract(object): if (args or kwds) and cls.__init__ is object.__init__: raise TypeError("Can't pass arguments to __new__ " "without overriding __init__") - return object.__new__(cls) + return super().__new__(cls) @classmethod def __subclasshook__(cls, subclass): |