python 3 hash workaround