bpo-31487: Update F-strings doc example (GH-3627) (GH-3628) · python/cpython@4f6bae9

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 4f6bae9

miss-islingtonMariatta

authored and

committed

bpo-31487: Update F-strings doc example (GH-3627) (GH-3628)

Shorten the comment to: "using integer format specifier" (cherry picked from commit 63c591c)

1 parent b417332 commit 4f6bae9

File tree

1 file changed

+

1

-

1

lines changed

1 file changed

+

1

-

1

lines changed

Lines changed: 1 addition & 1 deletion

Original file line numberDiff line numberDiff line change

@@ -680,7 +680,7 @@ Some examples of formatted string literals::

680680

>>> f"{today:%b %d, %Y}" # using date format specifier

681681

'January 27, 2017'

682682

>>> number = 1024

683-

>>> f"{number:#0x}" # using integer presentation type as format specifier

683+

>>> f"{number:#0x}" # using integer format specifier

684684

'0x400'

685685
686686

A consequence of sharing the same syntax as regular string literals is

0 commit comments

Comments

 (0)