Update LazyObject method proxy declarations to simpler form.

This commit is contained in:
Nick Bruun 2013-08-18 15:58:55 +02:00
parent b9ef96e73c
commit 7a698c05b5
1 changed files with 2 additions and 7 deletions

View File

@ -270,13 +270,8 @@ class LazyObject(object):
def __delitem__(self, key):
del self[key]
@new_method_proxy
def __len__(self):
return len(self)
@new_method_proxy
def __contains__(self, key):
return key in self
__len__ = new_method_proxy(len)
__contains__ = new_method_proxy(operator.contains)
# Workaround for http://bugs.python.org/issue12370