print longs

Skip Montanaro skip at mojam.com
Tue Oct 5 11:08:37 EDT 1999


    Hrvoje> David Ascher <da at ski.org> writes:
    >> So you want sqrt(-1) to always succeed?  Brr..

    Hrvoje> What's wrong with that?  In Common Lisp, (sqrt -1) happily returns
    Hrvoje> #C(0.0 1.0), and I don't see it as a bad thing at all.

Can't we get the behavior David described with

    import cmath
    math = cmath

or

    from cmath import *

?  I thought the reason that cmath was written (and kept distinct from math)
was so that existing code that expected math.sqrt(-1) to raise OverflowError
didn't suddenly begin "working".

Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
847-971-7098   | Python: Programming the way Guido indented...




More information about the Python-list mailing list