nick coghlan uytankmfgmailcom mark dickinson wrote tue mar 25 2008 946 oleg broytmann wrote 252 prints change bug feature shouldnt to_eng_string always return str id call bug change accident sideeffect fact 251 coefficient mantissa decimal stored tuple 252 stored string greatly improves efficiency clearly 252 mantissa stored unicode instance second case explicitly coerced str decimal__new__ others agree bug ill fix thought might happened couldnt remember optimisation 26 change suspect included 25 prereq spec compliance updates anyway 1 coercing mantissa str instance 25 raise interesting point though currently decimal py3k storing mantissa unicode instance instead bytes instance performance implications horrendous since pylong_fromunicode malloc encodes string malloced buffer invokes pylong_fromstring result fix decimal probably needs grow something like following near top module try _bytes bytes except nameerror 25 earlier _bytes str use _bytes instead str appropriate throughout rest module following also problem py3k decimal import decimal d1 decimal1 d1 decimal1 db1 traceback recent call last file line 1 file homencoghlandevelpy3klibdecimalpy line 659 __new__ raise typeerrorcannot convert r decimal value typeerror convert b1 decimal isinstancevalue str check py3k restrictive needs accept bytes instances well cheers nick nick coghlan uytankmfgmailcom brisbane australia httpwwwboredomandlazinessorg _______________________________________________ pythondev mailing list zvlllneumpythonorg httpmailpythonorgmailmanlistinfopythondev unsubscribe httpmailpythonorgmailmanoptionspythondevpythondev40tangomucom thu 07 aug 2008 091214 1000 pythondev decimalunicode