[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-26 Thread Thomas Kehrenberg
Apr 26, 2022 20:32:55 Eric V. Smith : How would runtime consumers of annotations use this? -- Eric On Apr 26, 2022, at 12:05 PM, Thomas Kehrenberg wrote: If the problem is mostly type annotations, then another potential solution would be to make use of .pyi files, which

[Python-Dev] Re: Proto-PEP part 1: Forward declaration of classes

2022-04-26 Thread Thomas Kehrenberg
If the problem is mostly type annotations, then another potential solution would be to make use of .pyi files, which are not hamstrung by circular definitions. The idea would be that type checkers would merge the annotations from .pyi files into the annotations in the corresponding .py file. So: