diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-11-27 15:46:15 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-11-27 15:46:15 (GMT) |
commit | f51f713f303162572ded83d97772a1516d113c64 (patch) | |
tree | 3cebf6c3c2c3eb3993f3b75e930abb4b060b5646 /Lib/collections | |
parent | 8943ecfab20168f2b18bc477efb7671e32e91c24 (diff) | |
parent | a86700ae875413e17a1a62306acead7908b6b064 (diff) | |
download | cpython-f51f713f303162572ded83d97772a1516d113c64.zip cpython-f51f713f303162572ded83d97772a1516d113c64.tar.gz cpython-f51f713f303162572ded83d97772a1516d113c64.tar.bz2 |
Issue #22609: Revert changes in UserDict. They conflicted with existing tests.
Diffstat (limited to 'Lib/collections')
-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) |