Just spitballing but how about any.obj as an alias for typing.Any? It suffers from the same problem as using naked any- which is that any doesn't really have anything to do with type hinting... but it doesn't suffer from the problem of having to convert any to a type. It would just grow a class attribute referring to typing.any. And it seems pretty readable to me.
Rick. On Sat, Oct 2, 2021, 10:30 AM Serhiy Storchaka <[email protected]> wrote: > 02.10.21 17:10, Todd пише: > > Is there a reason we can't use "Object" and make "Any" just an alias for > > "Object"? > > If you mean "object", then the reason is that "object" has no methods > and attributes (besides few dunder methods like __repr__ and > __reduce__), while "Any" has all methods and attributes. > > _______________________________________________ > 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/NMKXERTCY3ROGUNKMKPIMRMAZWSPOFCO/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ 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/LQYA57TE5IQTTOIIGXTAWXEAMQXTGDMY/ Code of Conduct: http://python.org/psf/codeofconduct/
