mirror of https://github.com/django/django.git
Update LazyObject method proxy declarations to simpler form.
This commit is contained in:
parent
b9ef96e73c
commit
7a698c05b5
|
@ -270,13 +270,8 @@ class LazyObject(object):
|
||||||
def __delitem__(self, key):
|
def __delitem__(self, key):
|
||||||
del self[key]
|
del self[key]
|
||||||
|
|
||||||
@new_method_proxy
|
__len__ = new_method_proxy(len)
|
||||||
def __len__(self):
|
__contains__ = new_method_proxy(operator.contains)
|
||||||
return len(self)
|
|
||||||
|
|
||||||
@new_method_proxy
|
|
||||||
def __contains__(self, key):
|
|
||||||
return key in self
|
|
||||||
|
|
||||||
|
|
||||||
# Workaround for http://bugs.python.org/issue12370
|
# Workaround for http://bugs.python.org/issue12370
|
||||||
|
|
Loading…
Reference in New Issue