          def __unicode_cast(self):
              return self.__func(*self.__args, **self.__kw)
  
          def __str_cast(self):
              return str(self.__func(*self.__args, **self.__kw))
  
          def __cmp__(self, rhs):
              if self._delegate_str:
                  s = str(self.__func(*self.__args, **self.__kw))
              elif self._delegate_unicode:
 
</s> remove             return self.__func(*self.__args, **self.__kw)
 </s> add             return func(*self.__args, **self.__kw) </s> remove                 s = str(self.__func(*self.__args, **self.__kw))
 </s> add                 s = str(func(*self.__args, **self.__kw)) </s> remove                 s = unicode(self.__func(*self.__args, **self.__kw))
 </s> add                 s = unicode(func(*self.__args, **self.__kw)) </s> remove             cls.__dispatch[klass][funcname] = func
 </s> add             cls.__dispatch[klass][funcname] = method </s> remove                 s = self.__func(*self.__args, **self.__kw)
 </s> add                 s = func(*self.__args, **self.__kw)
            return str(func(*self.__args, **self.__kw))
          def __unicode_cast(self):
              return self.__func(*self.__args, **self.__kw)
  
          def __str_cast(self):
            return str(func(*self.__args, **self.__kw))
  
          def __cmp__(self, rhs):
              if self._delegate_str:
                  s = str(self.__func(*self.__args, **self.__kw))
              elif self._delegate_unicode:
keep keep keep keep replace keep keep keep keep keep
 Try to save memory and time when using lazy objects by refering to their function via the closure, and not making it an attribute on each instance.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17360 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/utils/functional.py