diff options
Diffstat (limited to 'django/utils/functional.py')
| -rw-r--r-- | django/utils/functional.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/django/utils/functional.py b/django/utils/functional.py index 9dc321ebd8..055e511912 100644 --- a/django/utils/functional.py +++ b/django/utils/functional.py @@ -34,17 +34,16 @@ class cached_property: class Promise: """ - This is just a base class for the proxy class created in - the closure of the lazy function. It can be used to recognize - promises in code. + Base class for the proxy class created in the closure of the lazy function. + It's used to recognize promises in code. """ pass def lazy(func, *resultclasses): """ - Turns any callable into a lazy evaluated callable. You need to give result - classes or types -- at least one is needed so that the automatic forcing of + Turn any callable into a lazy evaluated callable. result classes or types + is required -- at least one is needed so that the automatic forcing of the lazy evaluation code is triggered. Results are not memoized; the function is evaluated on every access. """ @@ -383,7 +382,7 @@ class SimpleLazyObject(LazyObject): def partition(predicate, values): """ - Splits the values into two sets, based on the return value of the function + Split the values into two sets, based on the return value of the function (True/False). e.g.: >>> partition(lambda x: x > 3, range(5)) |
