[pypy-dev] pow and complex object

holger krekel hpk at trillke.net
Fri Jul 2 20:41:51 CEST 2004

Hi Ben, 

[Ben Young Fri, Jul 02, 2004 at 04:44:07PM +0100]
> I found a few weirdities in pos and complex. I tries to fix them by putting 
> debugging print statements in complexobject.py in appspace but these did not 
> seem to be picked up. Is this the right place to do this or does complex 
> exist somewhere else? (All this is in std object space)

the class complex now lives in module/__builtin__module.py and i just 
killed the leftover appspace one.  We moved it during the last sprint. 

Note, that module/__builtin__module.py contains regular python code 
while module/__builtin__interp.py contains the part that has to be 
implemented at interpreter-level, e.g. locals(). 
> pow(2j, 2) => (1+3.4247374308419473e-311j) should be (-4 + 0j)
> pow(2j, "fde") => 0j should be type error

you might fix that now (maybe by writing some tests first and putting
them into e.g. module/test/test_builtin.py). 


More information about the Pypy-dev mailing list