Since Python 3.10, you can use "Any" without "from typing import Any". You can do it in Python 3.7 by "from __future__ import annotations" too.
See https://www.python.org/dev/peps/pep-0563/ Regards, On Mon, Nov 30, 2020 at 12:29 AM Abdulla Al Kathiri <[email protected]> wrote: > > Instead of importing “Any" from the typing module, we can annotate our > functions with “Any" right away without the extra step. What do you think? We > have the builtin function “any” which some Python users could mistakingly > use, but static type checkers should catch that. > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/ELI474TKP2OKHP4NW5HOVUPKDPLYE2JP/ > Code of Conduct: http://python.org/psf/codeofconduct/ -- Inada Naoki <[email protected]> _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/VENGRL6T54XQUYDXONZRZE7LUCO6MKWI/ Code of Conduct: http://python.org/psf/codeofconduct/
