mirror of
https://github.com/Hopiu/django-modeltranslation.git
synced 2026-05-09 22:04:48 +00:00
Merge pull request #434 from bennylope/bennylope-patch-1
Add docstring documentation for utils.unique
This commit is contained in:
commit
fa60d1852f
1 changed files with 4 additions and 0 deletions
|
|
@ -95,6 +95,10 @@ def build_css_class(localized_fieldname, prefix=''):
|
|||
|
||||
def unique(seq):
|
||||
"""
|
||||
Returns a generator yielding unique sequence members in order
|
||||
|
||||
A set by itself will return unique values without any regard for order.
|
||||
|
||||
>>> list(unique([1, 2, 3, 2, 2, 4, 1]))
|
||||
[1, 2, 3, 4]
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue