python3: from __future__ import absolute_import, division, print_function #1412
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do and why is it necessary?
it makes the behavior between python 2 and 3 similar for the below items
from future import absolute_import, division, print_function
it also ensures that changes submitted after this will benefit from this behavior changes
How was it tested? How can it be tested by the reviewer?
travis-ci
visually inspected the divisions in the code
Any background context you want to provide?
division is good it ensures we get same results in both python 2 and 3 but is hard to determine if any existing division 3/2 = 1 will now become =1.5 and brake something
the change is necessary but has a risk.
for example
line_width = wall_thickness / line_count
will work fine because wall_thickness is a float and division will be fine
or here where the code explicit calls for float division by using 2.0
self.get_float("machine_width") / 2.0
and all i could see looked ok, but cannot be 100% sure one division in all the code has not modified it's value.
if there is such case found i could add unit test and fix the problem in that specific instance.
What are the relevant tickets if any?
Screenshots (if appropriate)
Further notes