summaryrefslogtreecommitdiffstats
path: root/Lib/collections/__init__.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-11-27 15:45:44 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-11-27 15:45:44 (GMT)
commita86700ae875413e17a1a62306acead7908b6b064 (patch)
tree543cb5090da269b66551f37211f97f61596f6e7e /Lib/collections/__init__.py
parentae5cb214d2cd41d96943a0ef43a4e95bd9a10b7a (diff)
downloadcpython-a86700ae875413e17a1a62306acead7908b6b064.zip
cpython-a86700ae875413e17a1a62306acead7908b6b064.tar.gz
cpython-a86700ae875413e17a1a62306acead7908b6b064.tar.bz2
Issue #22609: Revert changes in UserDict. They conflicted with existing tests.
Diffstat (limited to 'Lib/collections/__init__.py')
-rw-r--r--Lib/collections/__init__.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
index 25d33e0..565ae86 100644
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -893,14 +893,7 @@ class ChainMap(MutableMapping):
class UserDict(MutableMapping):
# Start by filling-out the abstract methods
- def __init__(*args, **kwargs):
- if not args:
- raise TypeError("descriptor '__init__' of 'UserDict' object "
- "needs an argument")
- self, *args = args
- if len(args) > 1:
- raise TypeError('expected at most 1 arguments, got %d' % len(args))
- dict = args[0] if args else None
+ def __init__(self, dict=None, **kwargs):
self.data = {}
if dict is not None:
self.update(dict)