Lossless Number Conversion

Chris Spencer usenet.20.evilspam at spamgourmet.com
Sun Aug 28 17:36:42 EDT 2005


Is there any library for Python that implements a kind of universal 
number object. Something that, if you divide two integers, generates a 
ratio instead of a float, or if you take the square root of a negative, 
generates a complex number instead of raising an exception? Lisp has 
something like this, and it makes number crunching much more convenient.

Chris



More information about the Python-list mailing list