diff options
Diffstat (limited to 'Lib/stringold.py')
-rw-r--r-- | Lib/stringold.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/stringold.py b/Lib/stringold.py index c245a493af..1c45ab3b86 100644 --- a/Lib/stringold.py +++ b/Lib/stringold.py @@ -142,6 +142,6 @@ def zfill(x, width): n = len(s) if n >= width: return s sign = '' - if s[0] = '-': - sign, s = '-', s[1:] + if s[0] in ('-', '+'): + sign, s = s[0], s[1:] return sign + '0'*(width-n) + s |