Skip to content

bpo-31487: Improve f-strings documentation#3604

Merged
Mariatta merged 1 commit intomasterfrom
Mariatta-patch-1
Sep 16, 2017
Merged

bpo-31487: Improve f-strings documentation#3604
Mariatta merged 1 commit intomasterfrom
Mariatta-patch-1

Conversation

@Mariatta
Copy link
Member

@Mariatta Mariatta commented Sep 15, 2017

Provide more examples of using format specifiers

https://bugs.python.org/issue31487

Provide more examples of using format specifiers
@Mariatta Mariatta added the docs Documentation in the Doc dir label Sep 15, 2017
@Mariatta Mariatta changed the title Improve f-strings documentation bpo-31487: Improve f-strings documentation Sep 15, 2017
@Mariatta Mariatta requested a review from ericvsmith September 15, 2017 17:35
Copy link
Member

@ezio-melotti ezio-melotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples are good, however I find the wording of the comments a bit complicated (perhaps because I'm not yet familiar with the f-strings terminology).
Unless the goal of the comment is explaining the terminology, I would use a more goal-oriented comment, such as "show the int as a zero-padded lower-case hexadecimal value prefixed by '0x'"

@Mariatta
Copy link
Member Author

Thanks @ezio-melotti . Hmm I'm following the terminology here: https://docs.python.org/3.7/library/string.html#format-specification-mini-language where it says The available integer presentation types are ..

@Mariatta Mariatta merged commit f361897 into master Sep 16, 2017
@miss-islington
Copy link
Contributor

Thanks @Mariatta for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@Mariatta Mariatta deleted the Mariatta-patch-1 branch September 16, 2017 18:46
@bedevere-bot
Copy link

GH-3619 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 16, 2017
Provide additional examples of using format specifiers in f-strings
Added examples for using integer and date format specifiers.
(cherry picked from commit f361897)
Mariatta pushed a commit that referenced this pull request Sep 16, 2017
Provide additional examples of using format specifiers in f-strings
Added examples for using integer and date format specifiers.
(cherry picked from commit f361897)
@ericvsmith
Copy link
Member

Sorry, I was busy and I'm just getting around to reading email.

@ezio-melotti and @Mariatta : I think I would have said "integer format specifier", but the text as-is is technically correct.

@Mariatta
Copy link
Member Author

Thanks @ericvsmith. No worries, I'll update the comment to "integer format specifier" to make it brief.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants