Re: [Pyobjc-dev] Lion and pyobjc 2.2b3 Decimal compares with NSDecimalNumber compare goes in endles
Brought to you by:
ronaldoussoren
From: Marc V. O. <mar...@gm...> - 2011-12-01 21:34:48
|
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 <mar...@gm...>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 <aa...@py...> 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 (aa...@py...) <*> >> http://www.pythoncraft.com/ >> >> "....Normal is what cuts off your sixth finger and your tail..." >> --Siobhan >> > > |