| 1 |
# flags: --minimum-version=3.12 |
| 2 |
|
| 3 |
type A=int |
| 4 |
type Gen[T]=list[T] |
| 5 |
type Alias[T]=lambda: T |
| 6 |
type And[T]=T and T |
| 7 |
type IfElse[T]=T if T else T |
| 8 |
type One = int; type Another = str |
| 9 |
class X: type InClass = int |
| 10 |
|
| 11 |
type = aliased |
| 12 |
print(type(42)) |
| 13 |
|
| 14 |
# output |
| 15 |
|
| 16 |
type A = int |
| 17 |
type Gen[T] = list[T] |
| 18 |
type Alias[T] = lambda: T |
| 19 |
type And[T] = T and T |
| 20 |
type IfElse[T] = T if T else T |
| 21 |
type One = int |
| 22 |
type Another = str |
| 23 |
|
| 24 |
|
| 25 |
class X: |
| 26 |
type InClass = int |
| 27 |
|
| 28 |
|
| 29 |
type = aliased |
| 30 |
print(type(42)) |