Skip to content

"% -4d" format specifier produces centered output instead of left-aligned in Python 3.13.2 #139382

@11python11

Description

@11python11

Bug report

Bug description:

m = 12
print("|% -4d|" % m)

Actual output: | 12 |
Expected output: |12 |

CPython versions tested on:

3.13

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions