Skip to content

Commit

Permalink
More docstring updates for one()
Browse files Browse the repository at this point in the history
  • Loading branch information
bbayles committed Dec 2, 2017
1 parent dfcd00a commit 2733296
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions more_itertools/more.py
Expand Up @@ -422,12 +422,12 @@ def with_iter(context_manager):

def one(iterable, too_short=ValueError, too_long=ValueError):
"""Return the first item from *iterable*, which is expected to contain only
that item. Raise an exception *iterable* is empty or has more than one
that item. Raise an exception if *iterable* is empty or has more than one
item.
:func:`one` is useful for ensuring that an iterable contains only one item.
For example, it can be used to retrieve the result of a database query
that is expected to return only a single row.
that is expected to return a single row.
If *iterable* is empty, ``ValueError`` will be raised. You may specify a
different exception type with the *too_short* keyword:
Expand Down

0 comments on commit 2733296

Please sign in to comment.