mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Merged revisions 84984 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84984 | mark.dickinson | 2010-09-23 21:11:19 +0100 (Thu, 23 Sep 2010) | 5 lines Issue #9930: Remove an unnecessary type check in wrap_binaryfunc_r; this was causing reversed method calls like float.__radd__(3.0, 1) to return NotImplemented instead of the expected numeric value. ........
This commit is contained in:
parent
9227508dec
commit
a67c70d4a9
3 changed files with 9 additions and 4 deletions
|
@ -289,6 +289,11 @@ class OperatorsTest(unittest.TestCase):
|
|||
self.assertEqual(repr(a), "234.5")
|
||||
self.assertEqual(a.prec, 12)
|
||||
|
||||
def test_explicit_reverse_methods(self):
|
||||
# see issue 9930
|
||||
self.assertEqual(complex.__radd__(3j, 4.0), complex(4.0, 3.0))
|
||||
self.assertEqual(float.__rsub__(3.0, 1), -2.0)
|
||||
|
||||
@support.impl_detail("the module 'xxsubtype' is internal")
|
||||
def test_spam_lists(self):
|
||||
# Testing spamlist operations...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue