Message97259
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()
>>> c.divide
<bound method Context.divide of Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=-999999999, Emax=999999999, capitals=1, flags=[], traps=[Overflow, InvalidOperation, DivisionByZero])>
>>> c.divide(2,3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/decimal.py", line 3966, in divide
return a.__div__(b, context=self)
TypeError: wrapper __div__ doesn't take keyword arguments
>>> c.divide(Decimal(2),3)
Decimal('0.6666666666666666666666666667')
>>> c.divide(6,Decimal(2))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/decimal.py", line 3966, in divide
return a.__div__(b, context=self)
TypeError: wrapper __div__ doesn't take keyword arguments |
|
Date |
User |
Action |
Args |
2010-01-05 11:22:03 | jjconti | set | recipients:
+ jjconti, mark.dickinson, skrah |
2010-01-05 11:22:03 | jjconti | set | messageid: <1262690523.25.0.746579726432.issue7633@psf.upfronthosting.co.za> |
2010-01-05 11:20:38 | jjconti | link | issue7633 messages |
2010-01-05 11:20:37 | jjconti | create | |
|