From 398000789cd9afccdf168f34b6f46af0fcfd824e Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Wed, 7 Aug 2019 08:07:45 +0200 Subject: [PATCH] Add note about iterators --- flat_tree/iterator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flat_tree/iterator.py b/flat_tree/iterator.py index e0abf86..65ace5a 100644 --- a/flat_tree/iterator.py +++ b/flat_tree/iterator.py @@ -19,6 +19,10 @@ class FlatTreeIterator: def __attrs_post_init__(self): self.seek(self.index) + # TODO(decentral1se): Once we get to the point of actually using this + # module in hypercore or wherever it is needed we should consider whether + # or not to make this a real Python iterator using the protocol methods of + # __iter__ and __next__ def next(self) -> int: """The next index in the tree.""" self.offset += 1