c# 4.0 - Overloading magic methods with IronPython -
i'm attempting define power operator ** in c# class (we'll call class foo). i've overridden __pow__()
, gets me desired behavior operations of type foo ** int
. unfortunately, need define int ** foo
, , neither using dynamic values nor overloading __pow__()
gives me desired behavior; receive error unsupported operand type(s) **: 'int' , 'foo'
. have overridden c#-recognized operators using operator keyword; both foo / int
, int / foo
functioning successfully. there way __pow__()
? thank in advance.
Comments
Post a Comment