Message75916
I wonder if a patch for ctypes like this (which is not yet complete)
could be used to implement this, or MUST it be implemented in C?
The patch contains a mixin class that implements the numeric methods.
However, the actual operation takes place in Python; only the operands
are converted into ctypes types first, the operand is applied to the
value, and the result is converted to a ctypes instance again.
One difficulty with the patch is that the original ctypes code contained
a tp_as_number member where only the nb_nonzero slot was actually
implemented; this prevented the mixin class to do it's work (Python
didn't call the special methods. I wonder if there is a bug somewhere...). |
|
Date |
User |
Action |
Args |
2008-11-15 18:28:10 | theller | set | recipients:
+ theller, arigo, rhettinger, bob.ippolito, mark.dickinson, fredrik_j |
2008-11-15 18:28:09 | theller | set | messageid: <1226773689.19.0.864786710107.issue887237@psf.upfronthosting.co.za> |
2008-11-15 18:28:08 | theller | link | issue887237 messages |
2008-11-15 18:28:07 | theller | create | |
|