Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default padding side using new formatting and a number #40

Open
ccortezia opened this issue Jan 12, 2017 · 0 comments
Open

Default padding side using new formatting and a number #40

ccortezia opened this issue Jan 12, 2017 · 0 comments
Labels

Comments

@ccortezia
Copy link

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.

@ulope ulope added the content label Feb 4, 2017
The-Compiler added a commit to The-Compiler/fstring.help that referenced this issue Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants