summaryrefslogtreecommitdiff
path: root/Lib/string.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-03-23 18:53:03 +0000
committerGuido van Rossum <guido@python.org>2007-03-23 18:53:03 +0000
commitfc6107c857eece00252c44d37751926b1f66828e (patch)
tree2687d77d1d2b84296a7060ef6825bb1e6816579f /Lib/string.py
parentcd504c766cd71b9be381e73eb6ff6512e919a5f8 (diff)
downloadcpython-fc6107c857eece00252c44d37751926b1f66828e.tar.gz
Add a type.__init__() method that enforces the same signature as
type.__new__(), and then calls object.__init__(cls), just to be anal. This allows us to restore the code in string.py's _TemplateMetaclass that called super(...).__init__(name, bases, dct), which I commented out yesterday since it broke due to the stricter argument checking added to object.__init__().
Diffstat (limited to 'Lib/string.py')
-rw-r--r--Lib/string.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/string.py b/Lib/string.py
index d4d13b2272..921bd8b1d0 100644
--- a/Lib/string.py
+++ b/Lib/string.py
@@ -108,9 +108,7 @@ class _TemplateMetaclass(type):
"""
def __init__(cls, name, bases, dct):
- # A super call makes no sense since type() doesn't define __init__().
- # (Or does it? And should type.__init__() accept three args?)
- # super(_TemplateMetaclass, cls).__init__(name, bases, dct)
+ super(_TemplateMetaclass, cls).__init__(name, bases, dct)
if 'pattern' in dct:
pattern = cls.pattern
else: