aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/fractions.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/fractions.py')
-rw-r--r--Lib/fractions.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/fractions.py b/Lib/fractions.py
index cb05ae7c200..a8c67068522 100644
--- a/Lib/fractions.py
+++ b/Lib/fractions.py
@@ -504,6 +504,9 @@ class Fraction(numbers.Rational):
trim_point = not alternate_form
exponent_indicator = "E" if presentation_type in "EFG" else "e"
+ if align == '=' and fill == '0':
+ zeropad = True
+
# Round to get the digits we need, figure out where to place the point,
# and decide whether to use scientific notation. 'point_pos' is the
# relative to the _end_ of the digit string: that is, it's the number