[Python-checkins] r60392 - in python/branches/trunk-math: Doc/library/stdtypes.rst Lib/test/test_complex.py Objects/complexobject.c

Nick Coghlan ncoghlan at gmail.com
Wed Jan 30 22:59:03 CET 2008


Christian Heimes wrote:
> The complex methods were a test. I've moved them as polar(z) -> (r,
> phi), arg(z) -> phi and rect(r, phi) -> z to the cmath module. abs(z) is
> already defined as sqrt(z.real**2 + z.imag**2) -> r.

Given that 'arg' has an unfortunate namespace clash with the programming 
sense of the word 'argument', perhaps we could call that function 
'phase' instead? I've never encountered either cis or arg as terms in 
the context of complex numbers despite using them for years - the 
terminology has always been either real+imaginary or magnitude+phase for 
the work I've in AC power handling and digital signal processing.

Cheers,
Nick.

P.S. The latest version of these docs is much clearer - thanks!

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-checkins mailing list