I certainly wouldn't want to keep `from __future__ import annotations` in the language forever if Larry's PEP is accepted.
Of course you can still use explicit string literals in annotations. Your observation about the @dataclass decorator is significant. Thanks for that. On Tue, Feb 16, 2021 at 10:36 AM Joseph Perez <[email protected]> wrote: > PEP 649 doesn't prevent to use stringified annotations (Larry has > previously mentioned it in its response to Paul Bryan), and they seem to be > still required when `if TYPE_CHECKING:` is used, despite the PEP claim. > > And my last message bring some use cases where strings are also required > (notably, in recursive dataclasses). > _______________________________________________ > Python-Dev mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-dev.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/7QA3Z4CNYHW3GOEDAST6WW37O5OUJRW6/ > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-change-the-world/>
_______________________________________________ Python-Dev mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/QKEOZJDPBOVI7QMF5GJLVKV6LRYK5MLT/ Code of Conduct: http://python.org/psf/codeofconduct/
