Map __str__ appropriately in py2/py3