Message97207
I think that context methods should convert arguments regardless of position:
Python 2.7a0 (trunk:76132M, Nov 6 2009, 15:20:35)
[GCC 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-23ubuntu3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from decimal import *
>>> c = getcontext()
>>> c.add(8, Decimal(9))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/decimal.py", line 3866, in add
return a.__add__(b, context=self)
TypeError: wrapper __add__ doesn't take keyword arguments
>>>
>>> c.add(Decimal(9), 8)
Decimal('17')
>>>
Also, perhaps c.add(9, 8) should be allowed, too. |
|
Date |
User |
Action |
Args |
2010-01-04 13:01:13 | skrah | set | recipients:
+ skrah, mark.dickinson |
2010-01-04 13:01:13 | skrah | set | messageid: <1262610073.25.0.98727322064.issue7633@psf.upfronthosting.co.za> |
2010-01-04 13:01:12 | skrah | link | issue7633 messages |
2010-01-04 13:01:11 | skrah | create | |
|