Refactor Tholder into an generic multithreaded iterator class
As shown here, I'd say the most beautiful way would be to inherit from collections.abc.Iterator
, since
- Once we implement
__next__
we get__iter__
for free - Mixins are Python best practises
- Inheriting from sth called
Iterator
is a great way to explain the classes semantic usage
For the concept of mixins is this the best literature I've ever read, that should suffice as well