mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Removed superfluous **kwargs constructor cruft: this class predates
the dict(**kwargs) feature.
This commit is contained in:
parent
afe73c02a9
commit
10e52dbe28
1 changed files with 0 additions and 8 deletions
|
|
@ -258,14 +258,6 @@ class Dict(dict):
|
||||||
to retrieve values, making d.foo equivalent to d["foo"].
|
to retrieve values, making d.foo equivalent to d["foo"].
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __new__(cls, **kwargs):
|
|
||||||
self = dict.__new__(cls)
|
|
||||||
self.update(kwargs)
|
|
||||||
return self
|
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
|
||||||
self.update(kwargs)
|
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
try:
|
try:
|
||||||
value = self[attr]
|
value = self[attr]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue