Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Some code simplification

  • Loading branch information...
commit 40909826172374b849ddc9db8e1a8be9a8c3251b 1 parent aa01c99
Alex Gaynor authored August 18, 2013

Showing 1 changed file with 3 additions and 11 deletions. Show diff stats Hide diff stats

  1. 14  django/utils/functional.py
14  django/utils/functional.py
@@ -258,17 +258,9 @@ def _setup(self):
258 258
     __dir__ = new_method_proxy(dir)
259 259
 
260 260
     # Dictionary methods support
261  
-    @new_method_proxy
262  
-    def __getitem__(self, key):
263  
-        return self[key]
264  
-
265  
-    @new_method_proxy
266  
-    def __setitem__(self, key, value):
267  
-        self[key] = value
268  
-
269  
-    @new_method_proxy
270  
-    def __delitem__(self, key):
271  
-        del self[key]
  261
+    __getitem__ = new_method_proxy(operator.getitem)
  262
+    __setitem__ = new_method_proxy(operator.setitem)
  263
+    __delitem__ = new_method_proxy(operator.delitem)
272 264
 
273 265
     __len__ = new_method_proxy(len)
274 266
     __contains__ = new_method_proxy(operator.contains)

0 notes on commit 4090982

Please sign in to comment.
Something went wrong with that request. Please try again.