[PyKDE] SIP support for __radd__ and friends

Phil Thompson phil at riverbankcomputing.co.uk
Sun Aug 7 16:48:01 BST 2005

On Friday 29 July 2005 6:45 am, Gerard Vermeulen wrote:
> I like to see SIP support (in a class Foo) for slots like:
> __radd__
> __rsub__
> __rmul__
> __rdiv__
> __rtruediv__
> __rfloordiv__
> __rmod__
> __rdivmod__
> __rpow__
> __rlshift__
> __rrshift__
> __rand__
> __rxor__
> __ror__
> so that one can use:
> any_python_type binary_operator Foo_type

There was a reason why this wasn't implemented - but I can't remember what it 
was so I'll look at it again.

If I do add support I'll probably try and do it transparently, ie. if you 
define __add__ SIP will automatically generate a corresponding __radd__ so 
all you'll need to do is to re-build.


More information about the PyQt mailing list