I'm trying to add support for complex numbers to psyco. My first step
was to mindlessy copy pfloatobject and hope for the best. By dint of
fearless cut and paste programming I managed to get the standard
arithmetic operations going with complex numbers.
Now, being a glutton for punishment, I'm wondering if there is a way to
virtualize access to the attributes of a complex number. In principal,
it seems should be possible to implement z.real and z.imag faster than
going through all the python machinery, but I have no idea how to spell
that. I'd also be interested in figuring out how to speed z.conjugate(),
but that's a lower priority.