BucketIterator it be an iterator must also implement the next function.
https://stackoverflow.com/questions/33956034/why-is-an-iterable-object-not-an-iterator
This was a design decision that could go either way (I鈥檇 rather not conflate iterable and iterator in the same type, so it should be one or the other); currently, if you need an iterator object, you can call iter() on it.
One benefit of the current approach is that state doesn鈥檛 leak in what could be a confusing way, one drawback is that the class name is a lie...
This quote is gold "one drawback is that the class name is a lie". :joy:
Is it worth noting this in the documentation?
Yes :)
Most helpful comment
This quote is gold "one drawback is that the class name is a lie". :joy:
Is it worth noting this in the documentation?