The forward class annotations would not need need to be processed at runtime and could be no-ops.
forward class A: x: int y: list[int] A.__annotations__ could be empty. For a more complete example you could have, forward class A: value: B # This annotation is solely for type checker and is not actually saved at runtime. class B: value: A # Real annotation that is saved. continue class A: value: B # Real annotation that is saved. The rule would then be that any annotation inside forward class is equivalent to a noop. Continue class would still need to have same annotation repeated to actually set it at runtime. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/O3HMCIWUM6NGTSCGL7HFRBSDT7A4KFHP/ Code of Conduct: http://python.org/psf/codeofconduct/