From 91e7e0cd36b4dacadfd04d4712344aa6314f91a1 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Sun, 10 Jun 2018 18:45:49 -0400 Subject: [PATCH] add peekable docstrings --- peekable.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/peekable.py b/peekable.py index cd952f5e..4780427b 100644 --- a/peekable.py +++ b/peekable.py @@ -3,6 +3,10 @@ from collections import deque _marker = object() class Peekable(object): + """Peekable version of a normal python generator. + Useful when you don't want to evaluate the entire iterable to look at + a specific item at a given idx. + """ def __init__(self, iterable): self._it = iter(iterable) self._cache = deque()