O'Reilly logo
  • Sri Harsha V thinks this is interesting:

Given an iterator object X, the call next(X) is the same as X.__next__() on 3.X (and X.next() on 2.X), but is noticeably simpler and more version-neutral.


Cover of Learning Python, 5th Edition


A good point for portability across Python versions.