Skip to content

Commit

Permalink
couple of minor iter docstring adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
mahmoud committed Oct 20, 2019
1 parent bcee80d commit 5d34cc9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions glom/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,14 @@ def dropwhile(self, key=T):
# Terminal methods follow

def all(self):
"""A convenience method for turning an iterable into a list. Note that
this always consumes the whole iterable, and as such, does
*not* return a new :class:`Iter()` instance.
"""A convenience method which returns a new spec which turns an
iterable into a list.
>>> glom(range(5), Iter(lambda t: t * 2).all())
[0, 2, 4, 6, 8]
Note that this spec will always consume the whole iterable, and as
such, the spec returned is *not* an :class:`Iter()` instance.
"""
return (self, list)

Expand All @@ -348,7 +350,7 @@ def first(self, key=T, default=None):
condition.
As this spec yields at most one item, and not an iterable, the
return value of this method is not a new Iter() instance.
spec returned from this method is not an :class:`Iter()` instance.
"""
return (self, First(key=key, default=default))

Expand Down

0 comments on commit 5d34cc9

Please sign in to comment.