summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2022-07-04 00:35:35 -0700
committerScott Gasch <[email protected]>2022-07-04 00:35:35 -0700
commit1172b6778a036431b542fdc89bbfdd13e13b5e8d (patch)
tree6d2170b3688d88dd7047e3ea3d43b602d90092ae
parent72d255e75695973843f05f5bd60fb415ff782ffe (diff)
Fix iter_utils docs.
-rw-r--r--iter_utils.py4
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)