Back at university I found out about Python's operator overloading and decided to reimplement integers:

https://github.com/bjackman/pynum