mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
inherit maxchar of field value where needed (closes #14648)
This commit is contained in:
parent
1cf5aa9106
commit
80d07f8251
2 changed files with 5 additions and 0 deletions
|
@ -747,6 +747,9 @@ format_string_internal(PyObject *value, const InternalFormatSpec *format)
|
|||
len = format->precision;
|
||||
}
|
||||
|
||||
if (len)
|
||||
maxchar = PyUnicode_MAX_CHAR_VALUE(value);
|
||||
|
||||
calc_padding(len, format->width, format->align, &lpad, &rpad, &total);
|
||||
|
||||
if (lpad != 0 || rpad != 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue