From 0357386b5fe74a2bb03e3b9ba68db4ff4756cea9 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Fri, 18 Nov 2022 15:37:13 +0100 Subject: [PATCH] Deltas --- README.md | 3 +-- lazyList.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64bdc7a..601fae0 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,4 @@ Have you ever found yourself in a situation, where you used a generator, but the ## What does it do? It's a list, that gets initialied using an iterable. The list uses the iterable to generate when new elements are accessed. - -TODO: Bla +The LazyList is mutable and inserts, appends and extends are possible. The LazyList never contains holes, if you access at an index, all previous indexes that have not been generated will also be generated. You can use peak(1) to access the next element without incrementing the exposed iterable, peak(-3) looks 3 iterations into the past, peak(0) gives the current value... diff --git a/lazyList.py b/lazyList.py index 079189f..db0f116 100644 --- a/lazyList.py +++ b/lazyList.py @@ -72,5 +72,6 @@ class LazyList(list): super().append(item) def extend(self, other): + # TODO: Don't force expand second? self._requireLen(-1) super().extend(other)