summaryrefslogtreecommitdiffstats
path: root/Lib/string.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-03-23 04:58:42 (GMT)
committerGuido van Rossum <guido@python.org>2007-03-23 04:58:42 (GMT)
commit143b5640593528a074cc8b9bff8607c829f58b6a (patch)
tree707550918507f4e898da9239631d4b63e2dc29ee /Lib/string.py
parent82730f8d11050a567c6db88c91e7d788d8048e09 (diff)
downloadcpython-143b5640593528a074cc8b9bff8607c829f58b6a.zip
cpython-143b5640593528a074cc8b9bff8607c829f58b6a.tar.gz
cpython-143b5640593528a074cc8b9bff8607c829f58b6a.tar.bz2
- Bug #1683368: The object.__init__() and object.__new__() methods are
now stricter in rejecting excess arguments. The only time when either allows excess arguments is when it is not overridden and the other one is. For backwards compatibility, when both are overridden, it is a deprecation warning (for now; maybe a Py3k warning later). When merging this into 3.0, the warnings should become errors. Note: without the change to string.py, lots of spurious warnings happen. What's going on there?
Diffstat (limited to 'Lib/string.py')
-rw-r--r--Lib/string.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/string.py b/Lib/string.py
index 921bd8b..d4d13b2 100644
--- a/Lib/string.py
+++ b/Lib/string.py
@@ -108,7 +108,9 @@ class _TemplateMetaclass(type):
"""
def __init__(cls, name, bases, dct):
- super(_TemplateMetaclass, cls).__init__(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)
if 'pattern' in dct:
pattern = cls.pattern
else: