mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -24,14 +24,14 @@ def lazy(func, *resultclasses):
|
||||
# the evaluation and store the result. Afterwards, the result
|
||||
# is delivered directly. So the result is memoized.
|
||||
def __init__(self, args, kw):
|
||||
self.__func = func
|
||||
self.__args = args
|
||||
self.__kw = kw
|
||||
self.__dispatch = {}
|
||||
for resultclass in resultclasses:
|
||||
self.__dispatch[resultclass] = {}
|
||||
for (k, v) in resultclass.__dict__.items():
|
||||
setattr(self, k, self.__promise__(resultclass, k, v))
|
||||
self.__func = func
|
||||
self.__args = args
|
||||
self.__kw = kw
|
||||
self.__dispatch = {}
|
||||
for resultclass in resultclasses:
|
||||
self.__dispatch[resultclass] = {}
|
||||
for (k, v) in resultclass.__dict__.items():
|
||||
setattr(self, k, self.__promise__(resultclass, k, v))
|
||||
|
||||
def __promise__(self, klass, funcname, func):
|
||||
# Builds a wrapper around some magic method and registers that magic
|
||||
|
||||
Reference in New Issue
Block a user