Skip to content

Commit

Permalink
Update LazyObject method proxy declarations to simpler form.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbruun committed Aug 18, 2013
1 parent b9ef96e commit 7a698c0
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions django/utils/functional.py
Expand Up @@ -270,13 +270,8 @@ def __setitem__(self, key, value):
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
Expand Down

0 comments on commit 7a698c0

Please sign in to comment.