From: Scott Gasch Date: Mon, 4 Jul 2022 07:35:35 +0000 (-0700) Subject: Fix iter_utils docs. X-Git-Url: https://wannabe.guru.org/gitweb/?a=commitdiff_plain;h=1172b6778a036431b542fdc89bbfdd13e13b5e8d;p=python_utils.git Fix iter_utils docs. --- 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)