diff options
Diffstat (limited to 'Lib/collections/__init__.py')
-rw-r--r-- | Lib/collections/__init__.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 605e4c5..7925af6 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -922,14 +922,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) |