Martin McBride
1 min readMay 9, 2020

--

Good introduction. One minor quibble, though. The methods __getitem__, __setitem__and __len__don’t have anything to do with iteration as the article suggests. They are for indexing.

For iteration the methods __next__and __iter__are more relevant.

--

--

Martin McBride
Martin McBride

No responses yet