mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #22609: Revert changes in UserDict. They conflicted with existing tests.
This commit is contained in:
parent
ae5cb214d2
commit
a86700ae87
2 changed files with 2 additions and 28 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue