Special form for marking type aliases. Use TypeAlias to indicate that an assignment should be recognized as a proper type alias definition by type checkers. For example:: Predicate: TypeAlias = Callable[..., bool] It's invalid when used anywhere except as in the examp
(self, parameters)
| 783 | |
| 784 | @_SpecialForm |
| 785 | def TypeAlias(self, parameters): |
| 786 | """Special form for marking type aliases. |
| 787 | |
| 788 | Use TypeAlias to indicate that an assignment should |
| 789 | be recognized as a proper type alias definition by type |
| 790 | checkers. |
| 791 | |
| 792 | For example:: |
| 793 | |
| 794 | Predicate: TypeAlias = Callable[..., bool] |
| 795 | |
| 796 | It's invalid when used anywhere except as in the example above. |
| 797 | """ |
| 798 | raise TypeError(f"{self} is not subscriptable") |
| 799 | |
| 800 | |
| 801 | @_SpecialForm |
no outgoing calls