Skip to content

Commit 4996e98

Browse files
committed
Fix line wrapping.
Signed-off-by: Pete Wicken <[email protected]>
1 parent f5c9930 commit 4996e98

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Doc/library/string.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@ error.
416416
Added the ``'_'`` option (see also :pep:`515`).
417417

418418
*width* is a decimal integer defining the minimum total field width,
419-
including any prefixes, separators, and other formatting characters. If not specified, then the field width will be
420-
determined by the content.
419+
including any prefixes, separators, and other formatting characters.
420+
If not specified, then the field width will be determined by the content.
421421

422422
When no explicit alignment is given, preceding the *width* field by a zero
423423
(``'0'``) character enables

Python/formatter_unicode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ calc_number_widths(NumberFieldWidths *spec, Py_ssize_t n_prefix,
529529
/* min_width can go negative, that's okay. format->width == -1 means
530530
we don't care. */
531531
if (format->fill_char == '0' && format->align == '=')
532-
spec->n_min_width = format->width - n_non_digit_non_padding;
532+
spec->n_min_width = format->width + n_non_digit_non_padding;
533533
else
534534
spec->n_min_width = 0;
535535

0 commit comments

Comments
 (0)