Oleksii Bidiuk
2011-01-21 09:25:45 UTC
Hi,
did anybody have experience with using overloaded operators for managed
objects? I have a class that have e.g. the operator+ overloaded in C#, but
that does not seem to be picked up from the Python side. I have tried to add
overloading using the setattr(MyType, "name", method_name), but it only seem
to work for the native Python objects and not for the managed objects. In
both cases I get "TypeError: unsupported operand type(s) for +: 'MyType' and
'MyType'".
Thanks in advance!
did anybody have experience with using overloaded operators for managed
objects? I have a class that have e.g. the operator+ overloaded in C#, but
that does not seem to be picked up from the Python side. I have tried to add
overloading using the setattr(MyType, "name", method_name), but it only seem
to work for the native Python objects and not for the managed objects. In
both cases I get "TypeError: unsupported operand type(s) for +: 'MyType' and
'MyType'".
Thanks in advance!
--
oleksii
oleksii