Skip to content

Commit 581ce25

Browse files
miss-islingtoncsabella
authored andcommitted
bpo-32735: Fix typo in f-strings datetime format specifier example (GH-5464) (GH-5465)
The f-string example for using datetime format specifier does not match the given output. Changed the format from %b to %B so it matches the output of "January". (cherry picked from commit b299393) Co-authored-by: Cheryl Sabella <[email protected]>
1 parent 85a92d0 commit 581ce25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/reference/lexical_analysis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ Some examples of formatted string literals::
676676
>>> f"result: {value:{width}.{precision}}" # nested fields
677677
'result: 12.35'
678678
>>> today = datetime(year=2017, month=1, day=27)
679-
>>> f"{today:%b %d, %Y}" # using date format specifier
679+
>>> f"{today:%B %d, %Y}" # using date format specifier
680680
'January 27, 2017'
681681
>>> number = 1024
682682
>>> f"{number:#0x}" # using integer format specifier

0 commit comments

Comments
 (0)