yeah.. StopIteration is not an instance of Exception, is a subclass of it :^)
no, really:
help(StopIteration)
class StopIteration(Exception)
| Signal the end from iterator.__next__().
|
| Method resolution order:
| StopIteration
| Exception
| BaseException
| object
...