| 1 |
from pep0484_generic_parameters import list_t_to_list_t |
| 2 |
|
| 3 |
list_of_ints_and_strs: list[int | str] |
| 4 |
|
| 5 |
|
| 6 |
x2 = list_t_to_list_t(list_of_ints_and_strs)[0] |
| 7 |
|
| 8 |
x2 |
| 9 |
|
| 10 |
for z in list_t_to_list_t(list_of_ints_and_strs): |
| 11 |
|
| 12 |
z |
| 13 |
|
| 14 |
|
| 15 |
from pep0484_generic_passthroughs import ( |
| 16 |
typed_variadic_tuple_generic_passthrough, |
| 17 |
) |
| 18 |
|
| 19 |
variadic_tuple_str_int: tuple[int | str, ...] |
| 20 |
|
| 21 |
for m in typed_variadic_tuple_generic_passthrough(variadic_tuple_str_int): |
| 22 |
|
| 23 |
m |
| 24 |
|
| 25 |
|
| 26 |
def func_returns_byteslike() -> bytes | bytearray: |
| 27 |
pass |
| 28 |
|
| 29 |
|
| 30 |
func_returns_byteslike() |
| 31 |
|
| 32 |
|
| 33 |
pep604_optional_1: int | str | None |
| 34 |
pep604_optional_2: None | bytes |
| 35 |
|
| 36 |
|
| 37 |
pep604_optional_1 |
| 38 |
|
| 39 |
|
| 40 |
pep604_optional_2 |
| 41 |
|
| 42 |
|
| 43 |
pep604_in_str: "int | bytes" |
| 44 |
|
| 45 |
|
| 46 |
pep604_in_str |