[Ironpython-users] Implicit conversion of objects to float

Cesar Mello cmello at gmail.com
Fri Mar 2 17:53:18 CET 2012


Hey thanks so much for the great help! It worked perfectly.

Thanks! Best regards!!!
Mello



On Fri, Mar 2, 2012 at 1:24 PM, Jeff Hardy <jdhardy at gmail.com> wrote:

> On Fri, Mar 2, 2012 at 4:42 AM, Cesar Mello <cmello at gmail.com> wrote:
> > Hi!
> >
> > Is it possible for a .NET class to provide a property with the Python
> > datetime instead of System.DateTime?
>
> Yep - just use PythonDateTime.datetime, in the IronPython.Modules
> namespace.
>
> - Jeff
>
> >
> > Thank you very much for the attention!
> >
> > Best regards!
> > Mello
> >
> >
> >
> > On Thu, Mar 1, 2012 at 6:31 PM, Cesar Mello <cmello at gmail.com> wrote:
> >>
> >> It worked perfectly and fast! Thank you so much!!!!
> >>
> >> Best regards
> >> Mello
> >>
> >>
> >> On Thu, Mar 1, 2012 at 5:37 PM, Jeff Hardy <jdhardy at gmail.com> wrote:
> >>>
> >>> 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
> >>
> >>
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20120302/a8c3094e/attachment.html>


More information about the Ironpython-users mailing list