Le dimanche 14 mai 2006 à 11:01 +1000, Nick Coghlan a écrit : > Fredrik Johansson wrote: > > For example, square roots are known as math.sqrt(x) for floats, > > cmath.sqrt(x) for complex numbers, x.sqrt() for decimals, and > > gmpy.sqrt(x)/gmpy.fsqrt(x) for gmpy's types. Oh, and SciPy has its own > > sqrt function that works on arrays (but not Decimals or gmpy's types). > > Py3k's function overloading should fix this:
Or you can just write value**0.5 (which doesn't work with decimals, however) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com