4 ms·
This is a great, thorough overview. To me, the main omission is next / __next__. It was misnamed in Python 2 (corrected to be a "magic method" in Python 3) but
by agf 13y ago
This is a great, thorough overview. To me, the main omission is next / __next__. It was misnamed in Python 2 (corrected to be a "magic method" in Python 3) but belongs on the list nonetheless. It is the method of an iterator that returns the next item, and is core to (almost) any iterable object in Python (except sequences that can be sequentially indexed from zero).
- dirkk0 13y agoThe author states that this article is on github and can be improved there.