diff options
| -rw-r--r-- | iter_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/iter_utils.py b/iter_utils.py index 897493d..00c4221 100644 --- a/iter_utils.py +++ b/iter_utils.py @@ -55,7 +55,7 @@ class PeekingIterator(Iterator): class SamplingIterator(Iterator): """An iterator that simply echoes what source_iter produces but also collects a random sample (of size sample_size) of the stream that can - be queried via get_random_sample() at any time. + be queried at any time. >>> import collections >>> import random @@ -68,7 +68,7 @@ class SamplingIterator(Iterator): >>> s.__next__() 1 - >>> s.resovoir + >>> s() [0, 1] >>> collections.deque(s) |
