Skip to content

Default padding side using new formatting and a number #40

@ccortezia

Description

@ccortezia

The default padding side on the new formatting style is different depending on whether you are formatting a number or a string.

The example on build 516238e0e82853567ca7ba20adcbd634b8b8458a uses a string, and gets the default left alignment.

Trying the same with an int results in the opposite:

'{:10}'.format(1)
'         1'

This information may be implied later in the docs when talking about number formatting, but I felt a heads up could be of interest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions