Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update LazyObject method proxy declarations to simpler form.

  • Loading branch information...
commit 7a698c05b56d7d5e267241dc71c16c403efd2965 1 parent b9ef96e
Nick Bruun nickbruun authored
Showing with 2 additions and 7 deletions.
  1. +2 −7 django/utils/functional.py
9 django/utils/functional.py
View
@@ -270,13 +270,8 @@ def __setitem__(self, key, value):
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
Please sign in to comment.
Something went wrong with that request. Please try again.