Empty anvil.tables.SearchIterator should be "False"

How does that compare to your experience with other iterators in Python?

Here’s what I get with a regular iterator:

>>> i = iter([1,2,3])
>>> bool(i)
True
>>> i = iter([])
>>> bool(i)
True

This is one thing that makes an iterator different from a container. An empty container is “falsy”. Virtually all other “objects” are “truthy”.

1 Like