>>> print Mixed('-1 1/2') + 2
>>> print Mixed('3/4') + Mixed('1/2')
>>> print Mixed('-1-1/4') * 2
You'll feel like you're in second grade all over again!
easy_install mixedto get it.
I hosted the code on Assembla, which has free mercurial repository hosting, so anybody who wants to polish it up is welcome to!
hg clone http://hg.assembla.com/mixed_python mixed_pythongets you a copy of the repository.
And all this because I was importing into a table last night and noticed some mixed numbers. A normal human being would have just converted them to floats in her head and gone to bed...