mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed a mistake in function documentation 'django.utils.functional.partition'
Thanks Raman Barkholenka for the patch.
This commit is contained in:
parent
9ea4dc90b9
commit
86c5c0154f
1 changed files with 2 additions and 2 deletions
|
@ -312,8 +312,8 @@ def partition(predicate, values):
|
||||||
Splits the values into two sets, based on the return value of the function
|
Splits the values into two sets, based on the return value of the function
|
||||||
(True/False). e.g.:
|
(True/False). e.g.:
|
||||||
|
|
||||||
>>> partition(lambda: x > 3, range(5))
|
>>> partition(lambda x: x > 3, range(5))
|
||||||
[1, 2, 3], [4]
|
[0, 1, 2, 3], [4]
|
||||||
"""
|
"""
|
||||||
results = ([], [])
|
results = ([], [])
|
||||||
for item in values:
|
for item in values:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue