mirror of
https://github.com/python/cpython.git
synced 2025-09-18 22:50:26 +00:00
[3.13] Typing docs: normalize some indents in code examples (GH-120912) (#120915)
Co-authored-by: Nyakku Shigure <sigure.qaq@gmail.com>
This commit is contained in:
parent
99f18ea689
commit
d6791cd933
1 changed files with 5 additions and 4 deletions
|
@ -97,8 +97,9 @@ Type aliases are useful for simplifying complex type signatures. For example::
|
||||||
# The static type checker will treat the previous type signature as
|
# The static type checker will treat the previous type signature as
|
||||||
# being exactly equivalent to this one.
|
# being exactly equivalent to this one.
|
||||||
def broadcast_message(
|
def broadcast_message(
|
||||||
message: str,
|
message: str,
|
||||||
servers: Sequence[tuple[tuple[str, int], dict[str, str]]]) -> None:
|
servers: Sequence[tuple[tuple[str, int], dict[str, str]]]
|
||||||
|
) -> None:
|
||||||
...
|
...
|
||||||
|
|
||||||
The :keyword:`type` statement is new in Python 3.12. For backwards
|
The :keyword:`type` statement is new in Python 3.12. For backwards
|
||||||
|
@ -1871,8 +1872,8 @@ without the dedicated syntax, as documented below.
|
||||||
of ``*args``::
|
of ``*args``::
|
||||||
|
|
||||||
def call_soon[*Ts](
|
def call_soon[*Ts](
|
||||||
callback: Callable[[*Ts], None],
|
callback: Callable[[*Ts], None],
|
||||||
*args: *Ts
|
*args: *Ts
|
||||||
) -> None:
|
) -> None:
|
||||||
...
|
...
|
||||||
callback(*args)
|
callback(*args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue