YP.py: Check for both next() and __next__(), for Python 3 compatibility.
Authored by: jefft0 2019-08-10
Parent: [r942]
Child: [r944]