Re: [Ironpython-users] Implicit conversion of objects to float

2012-02-24 Thread Cesar Mello
OK thank you very much! Best regards Mello On Fri, Feb 24, 2012 at 6:17 PM, Jeff Hardy wrote: > On Fri, Feb 24, 2012 at 12:00 PM, Cesar Mello wrote: > > Thank you very much for the quick response Jeff! > > > > First, let me clarify I am a Python newbie, so my assumptions about > Python > > may

Re: [Ironpython-users] Implicit conversion of objects to float

2012-02-24 Thread Jeff Hardy
On Fri, Feb 24, 2012 at 12:00 PM, Cesar Mello wrote: > Thank you very much for the quick response Jeff! > > First, let me clarify I am a Python newbie, so my assumptions about Python > may be all wrong. > > I had tried __float__ in a Python object, but it does not work implicitly > inside expressi

Re: [Ironpython-users] Implicit conversion of objects to float

2012-02-24 Thread Cesar Mello
Thank you very much for the quick response Jeff! First, let me clarify I am a Python newbie, so my assumptions about Python may be all wrong. I had tried __float__ in a Python object, but it does not work implicitly inside expressions (and I think that's the correct behavior). You still have to u

Re: [Ironpython-users] Implicit conversion of objects to float

2012-02-24 Thread Jeff Hardy
On Fri, Feb 24, 2012 at 10:54 AM, Cesar Mello wrote: > Is there a way to satisfy both scenarios? So that the object could also be > evaluated implicitly as a float? > > My first thought was to use a coercion, but the documentation does not > recommend it. Any other suggestions please? You didn't

[Ironpython-users] Implicit conversion of objects to float

2012-02-24 Thread Cesar Mello
Hi, We embedded IronPython to allow users to specify custom KPIs to be calculated from plant-floor measurements. It's woking nicely. The user selects which measurements she wants, provides aliases to these and they get exposed to the expression scope as variables. But we have two kinds of users:

Re: [Ironpython-users] Patch

2012-02-24 Thread Slide
Yeah, I ran into an issue even with having the AppDomain.CurrentDomain.AssemblyResolve += ... in the same method as the call to PythonOps because it's at the beginning of the method that the runtime resolves the methods called, that's why I moved it to a static constructor. On Thu, Feb 23, 2012 at

Re: [Ironpython-users] Patch

2012-02-24 Thread Slide
I'll update the GlobalAssemblyCache check before pushing. On Thu, Feb 23, 2012 at 11:16 PM, Dino Viehland wrote: > This is awesome, a couple comments: > > Can AssemblyResolve be moved into PythonOps? It looks > like it keys off of Assembly.GetEntryAssembly() and so doesn’t

Re: [Ironpython-users] Patch

2012-02-24 Thread Slide
Good point, I'll make the change before pushing. On Thu, Feb 23, 2012 at 9:32 PM, Jeff Hardy wrote: > On Thu, Feb 23, 2012 at 7:55 PM, Slide wrote: > > Just wanted to get this out for review before I push it. I would have > done > > it through my fork on github and issued a pull request, but my

[Ironpython-users] IronPython, Daily Digest 2/23/2012

2012-02-24 Thread no_reply
Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] sys.float_info field values are inconsistent with those of CPython 2. [New comment] Better handling of binding failure due to .Net version 3. [New comment] Better error mess