Extendible base hashing in Python.