[Ironpython-users] Implicit conversion of objects to float

Jeff Hardy jdhardy at gmail.com
Thu Mar 1 21:37:49 CET 2012

On Thu, Mar 1, 2012 at 12:13 PM, Cesar Mello <cmello at gmail.com> wrote:
> Hey guys!
> Just curious: is there a way to implement in the .NET class something that
> maps to the ** operator?

You should be able to create a method called __pow__ like so:
    public object __pow__(object b, object e) { ... }

Replace object with whatever types you're working with.

- Jeff

More information about the Ironpython-users mailing list