Skip to content

Commit

Permalink
Merge pull request #15 from mgorny/ensure-unique-doctest
Browse files Browse the repository at this point in the history
Fix missing import in ensure_unique() doctest
  • Loading branch information
jaraco committed Feb 21, 2022
2 parents 64910de + 56b26ec commit a862cb7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions jaraco/itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,7 @@ def ensure_unique(iterable, key=lambda x: x):
"""
Wrap an iterable to raise a ValueError if non-unique values are encountered.
>>> from more_itertools import consume
>>> list(ensure_unique('abc'))
['a', 'b', 'c']
>>> consume(ensure_unique('abca'))
Expand Down

0 comments on commit a862cb7

Please sign in to comment.