From: Frank W. <fwi...@gm...> - 2006-06-16 20:11:37
|
On 6/15/06, Carlos Quiroz <jy...@cq...> wrote: > Hi all > > I decided to tackle complex in the 2.3 branch since some tests were > failing and it seems easy enough for starters. > I have solved most of the failing tests but I have a few things I > haven't been able to solve so I'd rather ask. > I'm using gexpose to generate the exposed methods for PyComplex and I > > 1. Right now I can expose a __pow__ method through the file below but it > generates only a version with 2 parameters while I need a version with 3 > params. > I have the feeling that "expose_vanilla_pow" should solve it but it > doesn't. Any tips?` Are you sure you need 3 params? The pow in __builtin__ that takes 3 params (the only way to invoke pow with an extra arg AFAIK) does essentially this: __builtin__.pow(x,y,z) --> x.__pow__(y,z) > 2. One of failing test is related to the conversion of a large string of > the form unicode("1"*500) to complex. The test says that it should fail > with a ValueError but I'm not sure if the failing should happen at the > conversion of complex, or at the conversion to float. I believe the > second will break other tests but it may be more correct. Not sure about this one... I know that both float and complex conversions should fail, at least that's what I get when I try it on CPython, but you probably already knew that. > > 3. You may notice that in the exposed file I needed to remove the line > breaks, otherwise the script would fail usin python 2.4 in Windows and > cygwin. Any tips? I'll try it on my windows/cygwin machine (really my wife's machine, not a big user of windows myself) and see if I have any luck. > > Regards > Carlos |