Makes itemlist work in Python 3