Author: lukeplant
Date: 2009-10-01 11:15:27 -0500 (Thu, 01 Oct 2009)
New Revision: 11600

Modified:
   django/trunk/django/utils/decorators.py
Log:
Removed some unused code and improved docstring on auto_adapt_to_methods


Modified: django/trunk/django/utils/decorators.py
===================================================================
--- django/trunk/django/utils/decorators.py     2009-09-30 06:40:34 UTC (rev 
11599)
+++ django/trunk/django/utils/decorators.py     2009-10-01 16:15:27 UTC (rev 
11600)
@@ -23,14 +23,12 @@
         return self.decorator(self.func)(*args, **kwargs)
     def __get__(self, instance, owner):
         return self.decorator(self.func.__get__(instance, owner))
-    def _get_name(self):
-        return self.func.__name__
-    def _get_doc(self):
-        return self.func.__doc__
 
 def auto_adapt_to_methods(decorator):
-    """Allows you to use the same decorator on methods and functions,
-    hiding the self argument from the decorator."""
+    """
+    Takes a decorator function, and returns a decorator-like callable that can
+    be used on methods as well as functions.
+    """
     def adapt(func):
         return MethodDecoratorAdaptor(decorator, func)
     return wraps(decorator)(adapt)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to