mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-130104: Call __rpow__ in ternary pow() if necessary (GH-130251)
Previously it was only called in binary pow() and the binary power operator.
This commit is contained in:
parent
72da4a4458
commit
62ff86fa55
10 changed files with 74 additions and 18 deletions
|
@ -1707,6 +1707,12 @@ class FractionTest(unittest.TestCase):
|
|||
self.assertRaisesMessage(TypeError,
|
||||
message % ("Fraction", "int", "int"),
|
||||
pow, F(3), 4, 5)
|
||||
self.assertRaisesMessage(TypeError,
|
||||
message % ("int", "Fraction", "int"),
|
||||
pow, 3, F(4), 5)
|
||||
self.assertRaisesMessage(TypeError,
|
||||
message % ("int", "int", "Fraction"),
|
||||
pow, 3, 4, F(5))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue