[issue9733] Can't iterate over multiprocessing.managers.DictProxy

2010-09-01 Thread Juan José Conti
New submission from Juan José Conti jjco...@gmail.com: I expected I could iterate over a DictProxy as I do over a regular dict. from multiprocessing import Manager m = Manager() d = m.dict() d DictProxy object, typeid 'dict' at 0x98a240c for x in d: ... print x ... Traceback (most

[issue7633] decimal.py: type conversion in context methods

2010-01-29 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: Yeah... I did't like that docstring either :) Removed! Also fixed Decimal.copy_sign, changed Context.copy_sign and added tests. -- Added file: http://bugs.python.org/file16052/issue7633_jjconti4.patch

[issue7633] decimal.py: type conversion in context methods

2010-01-28 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: 1) Agree. Extra checks removed. 2) My mistake. Fixed. 3) Fexed. 4) Methods documentation fixed. Also added examples. 5) Fixed 6) Allow ints in the following unary methods (all except the ones excluded by skrah in cdecimal): - abs - canonical

[issue7633] decimal.py: type conversion in context methods

2010-01-26 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: I've been working in the modified version of my last patch to solve the 6 mentioned points. I'm posting it in less than 24 hs. If you're not hurry, please wait for me. This is just my second patch and is very useful to learn how

[issue7652] Merge C version of decimal into py3k.

2010-01-07 Thread Juan José Conti
Changes by Juan José Conti jjco...@gmail.com: -- nosy: +jjconti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7652 ___ ___ Python-bugs-list

[issue7633] decimal.py: type conversion in context methods

2010-01-06 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: New patch. Fix Context.method that were returning NotImplemented. Decimal.__methods__ don't use raiseit=True in _convert_other so I check in Context.method and raise TypeError if necessary. Added tests for Context.divmod missed in first

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Juan José Conti
Juan José Conti jjco...@gnu.org added the comment: The same happens with other Context methods, like divide: Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information. from decimal import * c = getcontext

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: I've been reading http://speleotrove.com/decimal and seems not to be an explicit definition about this. I'm thinking in a patch I could supply tomorrow. What about the idea of changing the implementation from: return a.__add__(b

[issue7633] decimal.py: type conversion in context methods

2010-01-05 Thread Juan José Conti
Juan José Conti jjco...@gmail.com added the comment: The attached patch solves this issue. Finally, only operand 'a' needs to be converted to Decimal if it's not. I discover this after writing my tests and start the implementation. A Context.method is modified if it has more than one operand

[issue1779] int(- 1) is valud, but float(- 1) isn't. Which is right?

2008-01-19 Thread Juan José Conti
Juan José Conti added the comment: This is my first patch. Bug fix on revision 60076. -- nosy: +jjconti Added file: http://bugs.python.org/file9220/bug_fix_for_1779.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779

[issue1779] int(- 1) is valud, but float(- 1) isn't. Which is right?

2008-01-19 Thread Juan José Conti
Juan José Conti added the comment: The same patch as before plus tests. Added file: http://bugs.python.org/file9228/bug_fix_for_1779-plustests.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1779