summaryrefslogtreecommitdiff
path: root/Doc/reference
diff options
context:
space:
mode:
authorCheryl Sabella <cheryl.sabella@gmail.com>2018-01-31 16:37:51 -0500
committerNed Deily <nad@python.org>2018-01-31 17:02:57 -0500
commit70e304252af34dfde3d89c9a1aa48c0c4af17dd3 (patch)
tree483188a78bf18c33f8b8e68432997f6f42e9bc6d /Doc/reference
parentf3da70f8ab17219dfe122d43379b7a3f751bddab (diff)
downloadcpython-git-70e304252af34dfde3d89c9a1aa48c0c4af17dd3.tar.gz
bpo-32735: Fix typo in f-strings datetime format specifier example (GH-5464)
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".
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/lexical_analysis.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst
index 95b0f53a83..c6d96ca612 100644
--- a/Doc/reference/lexical_analysis.rst
+++ b/Doc/reference/lexical_analysis.rst
@@ -676,7 +676,7 @@ Some examples of formatted string literals::
>>> f"result: {value:{width}.{precision}}" # nested fields
'result: 12.35'
>>> today = datetime(year=2017, month=1, day=27)
- >>> f"{today:%b %d, %Y}" # using date format specifier
+ >>> f"{today:%B %d, %Y}" # using date format specifier
'January 27, 2017'
>>> number = 1024
>>> f"{number:#0x}" # using integer format specifier