This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author skrah
Recipients mark.dickinson, skrah
Date 2010-01-04.13:01:11
SpamBayes Score 1.926237e-14
Marked as misclassified No
Message-id <1262610073.25.0.98727322064.issue7633@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-01-04 13:01:13skrahsetrecipients: + skrah, mark.dickinson
2010-01-04 13:01:13skrahsetmessageid: <1262610073.25.0.98727322064.issue7633@psf.upfronthosting.co.za>
2010-01-04 13:01:12skrahlinkissue7633 messages
2010-01-04 13:01:11skrahcreate