Make itertools.py compatible with Python 3
Make once.py Python 3 compatible