                  raise TypeError("Lazy object returned unexpected type.")
  
              if klass not in cls.__dispatch:
                  cls.__dispatch[klass] = {}
              cls.__dispatch[klass][funcname] = func
              return __wrapper__
          __promise__ = classmethod(__promise__)
  
          def __unicode_cast(self):
              return self.__func(*self.__args, **self.__kw)
 
</s> remove             return self.__func(*self.__args, **self.__kw)
 </s> add             return func(*self.__args, **self.__kw) </s> remove                 res = self.__func(*self.__args, **self.__kw)
 </s> add                 res = func(*self.__args, **self.__kw) </s> remove             return str(self.__func(*self.__args, **self.__kw))
 </s> add             return str(func(*self.__args, **self.__kw)) </s> remove                 (self.__func, self.__args, self.__kw) + resultclasses
 </s> add                 (func, self.__args, self.__kw) + resultclasses </s> remove             self.__func = func
 </s> add 
            cls.__dispatch[klass][funcname] = method
                  raise TypeError("Lazy object returned unexpected type.")
  
              if klass not in cls.__dispatch:
                  cls.__dispatch[klass] = {}
            cls.__dispatch[klass][funcname] = method
              return __wrapper__
          __promise__ = classmethod(__promise__)
  
          def __unicode_cast(self):
              return self.__func(*self.__args, **self.__kw)
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