mirror of
https://github.com/python/cpython.git
synced 2025-09-30 12:21:51 +00:00
bpo-31487: Update F-strings doc example (GH-3627) (GH-3628)
Shorten the comment to: "using integer format specifier"
(cherry picked from commit 63c591c0b0
)
This commit is contained in:
parent
b417332bf4
commit
4f6bae9677
1 changed files with 1 additions and 1 deletions
|
@ -680,7 +680,7 @@ Some examples of formatted string literals::
|
|||
>>> f"{today:%b %d, %Y}" # using date format specifier
|
||||
'January 27, 2017'
|
||||
>>> number = 1024
|
||||
>>> f"{number:#0x}" # using integer presentation type as format specifier
|
||||
>>> f"{number:#0x}" # using integer format specifier
|
||||
'0x400'
|
||||
|
||||
A consequence of sharing the same syntax as regular string literals is
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue