none-filtering iterator for GrowingList
This commit is contained in:
1 parent
68e8cb844a
commit
3a8777e0a3
1 file changed
+5
@@ -40,6 +40,11 @@ class GrowingList(list):
|
|||||||
self.has_nones = fi < len(self)
|
self.has_nones = fi < len(self)
|
||||||
return fi
|
return fi
|
||||||
|
|
||||||
|
def without_nones(self):
|
||||||
|
for item in self:
|
||||||
|
if item is not None:
|
||||||
|
yield item
|
||||||
|
|
||||||
|
|
||||||
class IndexList(list):
|
class IndexList(list):
|
||||||
def __delitem__(self, index):
|
def __delitem__(self, index):
|
||||||
|
|||||||
Reference in new issue
Block a user