bpo-31487: Improve f-strings documentation#3604
Conversation
Provide more examples of using format specifiers
ezio-melotti
left a comment
There was a problem hiding this comment.
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'"
|
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 |
|
Thanks @Mariatta for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6. |
|
GH-3619 is a backport of this pull request to the 3.6 branch. |
Provide additional examples of using format specifiers in f-strings Added examples for using integer and date format specifiers. (cherry picked from commit f361897)
|
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. |
|
Thanks @ericvsmith. No worries, I'll update the comment to "integer format specifier" to make it brief. |
Provide more examples of using format specifiers
https://bugs.python.org/issue31487