Add note about iterators
This commit is contained in:
parent
021cdffbd1
commit
398000789c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user