Re: Lion and pyobjc 2.2b3 Decimal compares with NSDecimalNumber compare goes in endless recursive call..
Marc Van Olmen <[email protected]>
| Newsgroups | gmane.comp.python.pyobjc.devel |
|---|---|
| Message-ID | <CAODes28E89gZXj4S42YEx2KihHRPy9OLONJb2c5kJ2QZEOGWpw@mail.gmail.com> |
Aahz Regarding your suggestion, there is helper function that does that: Just for those googling for answers:, I can also add that from PyObjCTools.Conversion import fromPythonDecimal Does this conversion for you from Decimal To NSDecimalNumber. Code is located at: pyobjc-framework-Cocoa/Lib/PyObjCTools/Conversion.py On Thu, Dec 1, 2011 at 8:06 AM, Marc Van Olmen <[email protected]>wrote: > hi Aahz, > > i got an answer offline that confirmed a bug in Lion: > > :>>> aNSDecimalNumber.compare_(aPythonDecimal) >> >> This also causes infinite recusion, this time on the Python side. With >> some luck it is related to the issue you ran into using bindings. > > > I currently found a workaround in my code. I haven't tried yours yet. > > Thanks for the input! > > marc > > > On Tue, Nov 29, 2011 at 9:17 PM, Aahz <[email protected]> wrote: > >> On Tue, Nov 22, 2011, Marc Van Olmen wrote: >> > >> > for our project we haven't upgraded to latest version of pyobjc I just >> > notice we run with 2.2b3 but we have the following bug on Lion Only: >> > >> > When bindings try to compare a decimal number that originally came from >> > Python code. It goes in endless recursive calls... >> >> Nobody else has responded, so I'll just suggest that you should >> explicitly convert between Python Decimal and NSDecimalNumber. >> -- >> Aahz ([email protected]) <*> >> http://www.pythoncraft.com/ >> >> "....Normal is what cuts off your sixth finger and your tail..." >> --Siobhan >> > > ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Pyobjc-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyobjc-dev