mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #23921: Standardized documentation whitespace formatting.
Original patch by James Edwards.
This commit is contained in:
parent
387235085c
commit
dba903993a
63 changed files with 445 additions and 409 deletions
|
@ -234,12 +234,12 @@ does an index lookup using :func:`__getitem__`.
|
|||
|
||||
Some simple format string examples::
|
||||
|
||||
"First, thou shalt count to {0}" # References first positional argument
|
||||
"Bring me a {}" # Implicitly references the first positional argument
|
||||
"From {} to {}" # Same as "From {0} to {1}"
|
||||
"My quest is {name}" # References keyword argument 'name'
|
||||
"Weight in tons {0.weight}" # 'weight' attribute of first positional arg
|
||||
"Units destroyed: {players[0]}" # First element of keyword argument 'players'.
|
||||
"First, thou shalt count to {0}" # References first positional argument
|
||||
"Bring me a {}" # Implicitly references the first positional argument
|
||||
"From {} to {}" # Same as "From {0} to {1}"
|
||||
"My quest is {name}" # References keyword argument 'name'
|
||||
"Weight in tons {0.weight}" # 'weight' attribute of first positional arg
|
||||
"Units destroyed: {players[0]}" # First element of keyword argument 'players'.
|
||||
|
||||
The *conversion* field causes a type coercion before formatting. Normally, the
|
||||
job of formatting a value is done by the :meth:`__format__` method of the value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue