2 ms·
[1]: isinstance(StopIteration, Exception) [1]: False
by LtWorf 2y ago
[1]: isinstance(StopIteration, Exception)
[1]: False
- _ZeD_ 2y agoyeah.. 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 ...