Search code examples
pythonrational-numbers

Pure Python rational numbers module for 2.5


Has anybody seen such a thing? Small self-sufficient modules are preferred.


Solution

  • The fractions module from 2.6 can be ripped out if necessary. Grab fractions.py, numbers.py, and abc.py; all pure python modules.

    You can get the single files from here (2.6 branch, 2.7 does not work): http://hg.python.org/cpython/branches