Some code simplification
This commit is contained in:
parent
aa01c99f55
commit
4090982617
|
@ -258,17 +258,9 @@ class LazyObject(object):
|
||||||
__dir__ = new_method_proxy(dir)
|
__dir__ = new_method_proxy(dir)
|
||||||
|
|
||||||
# Dictionary methods support
|
# Dictionary methods support
|
||||||
@new_method_proxy
|
__getitem__ = new_method_proxy(operator.getitem)
|
||||||
def __getitem__(self, key):
|
__setitem__ = new_method_proxy(operator.setitem)
|
||||||
return self[key]
|
__delitem__ = new_method_proxy(operator.delitem)
|
||||||
|
|
||||||
@new_method_proxy
|
|
||||||
def __setitem__(self, key, value):
|
|
||||||
self[key] = value
|
|
||||||
|
|
||||||
@new_method_proxy
|
|
||||||
def __delitem__(self, key):
|
|
||||||
del self[key]
|
|
||||||
|
|
||||||
__len__ = new_method_proxy(len)
|
__len__ = new_method_proxy(len)
|
||||||
__contains__ = new_method_proxy(operator.contains)
|
__contains__ = new_method_proxy(operator.contains)
|
||||||
|
|
Loading…
Reference in New Issue