Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixed bug in fix_division_safe fixture #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2019
Merged

Fixed bug in fix_division_safe fixture #441

merged 1 commit into from
May 6, 2019

Conversation

fbessho
Copy link

@fbessho fbessho commented Mar 17, 2019

Currently, the futurize command converts

x / y * z
x / y / z

into

old_div(x, y * z)
old_div(x, y / z)

This behavior is wrong. In the first (second) example, the result of x/y should be multiplied (divided) by z instead.

This pull request changes the behavior such that the same input is converted to

old_div(x, y) * z
old_div(old_div(x, y), z)

Solves #434

@jmadler jmadler merged commit d94fb35 into PythonCharmers:master May 6, 2019
@jmadler
Copy link
Contributor

jmadler commented May 6, 2019

Thank you so much! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants