mirror of
https://github.com/django/django.git
synced 2025-09-18 00:10:22 +00:00
Refs #27656 -- Updated django.utils docstring verbs according to PEP 257.
This commit is contained in:
parent
98bcc5d81b
commit
9718fa2e8a
30 changed files with 255 additions and 329 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue