[issue45283] Top / function argument level ClassVar should not be allowed during `get_type_hints()`

Nikita Sobolev report at bugs.python.org
Sat Sep 25 14:39:40 EDT 2021


Nikita Sobolev <mail at sobolevn.me> added the comment:

Thank you, Ken Jin! Very clear explanation!

> It seems the current consensus is to use that import for code with purely static typing, and not use it with runtime typing libraries.

Is it an official position? Or just a common usage pattern?
What can we do to make this more widely known?

Maybe we can formulate something like "When to use: raw, string, future annotations" in the typing docs (https://docs.python.org/3/library/typing.html)?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45283>
_______________________________________


More information about the Python-bugs-list mailing list