mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Fix for bug [#452230] future division isn't propagated.
builtin_eval wasn't merging in the compiler flags from the current frame; I suppose we never noticed this before because future division is the first future-feature that can affect expressions (nested_scopes and generators had only statement-level effects).
This commit is contained in:
parent
a8278cc37e
commit
9fa96bed6f
2 changed files with 9 additions and 1 deletions
|
@ -335,6 +335,7 @@ self.assertEqual(Rat(10, 3) / 3, Rat(10, 9))
|
|||
self.assertEqual(2 / Rat(5), Rat(2, 5))
|
||||
self.assertEqual(3.0 * Rat(1, 2), 1.5)
|
||||
self.assertEqual(Rat(1, 2) * 3.0, 1.5)
|
||||
self.assertEqual(eval('1/2'), 0.5)
|
||||
"""
|
||||
|
||||
test_support.run_unittest(RatTestCase)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue