3 ms·
yeah.. StopIteration is not an instance of Exception, is a subclass of it :^) no, really: help(StopIteration) class StopIteration(Exception) | Sig
by _ZeD_ 2y ago
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
...