Am Sonntag, den 28.08.2005, 21:36 +0000 schrieb Chris Spencer: > 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.
Yes and no. There isn't general solution. But for example you want to allow complex number, just use cmath. Andreas
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
-- http://mail.python.org/mailman/listinfo/python-list