Improve hash function added to python compiler