complex numbers
It's me
itsme at yahoo.com
Tue Jan 11 13:23:24 EST 2005
Operator overloading (and function overloading) helps but not enough. You
have to be aware of the complex type *everywhere* you go and that's very
annoying and error prone. I've been the works with C++, and later with
Modelica. I am very happy that Python included *native* complex number
support.
I really like Python's notion of having just one data type: the duck.
"Anno Siegel" <anno4000 at lublin.zrz.tu-berlin.de> wrote in message
news:cs145l$8d6
<snip>
>
> Like this?
>
> use Math::Complex;
>
> my $z = sqrt( -1);
> print 1 + $z, "\n"; # prints "1+i"
>
> Operator overloading makes it possible to work with complex numbers as if
> they were a native data type.
>
> Anno
>
More information about the Python-list
mailing list