why no arg, abs methods for comlex type?

Daniel Schüle uval at rz.uni-karlsruhe.de
Fri Aug 5 22:34:58 CEST 2005


[...]

 > Derive your own subclass of complex and define those methods.

I think something as basic as an angle/arg of complex number
definetly belongs to the interface, and it would not even require a
great effort to put it there

most complex formulas out there use Euler representation
it's a waste of code lines (and programmers time)
to write 3 liner functions for the transformion between
a+bj <-> (r,angle)
Python makes things covenient
so we have complex numbers in the core language
the calculations where perfectly possible without them
using (re, im) tupels and many many sin/cos in the code
but imagine how ugly it would be ..
I would like see Python as a competitor to Matlab etc

Regards

--
Daniel




More information about the Python-list mailing list