New submission from Allan Daemon <rea....@gmail.com>:
The implementation of PEP 585 in 3.9 adds some new attributes, but they aren't listed with dir() (then, not list in autocomplete and IntelliSense). Python 3.9.0rc1+ (heads/3.9:d7cd1164c1, Aug 25 2020, 17:27:09) >>> li = list[int] >>> li.__origin__ <class 'list'> >>> getattr(li, '__origin__') <class 'list'> >>> '__origin__' in dir(li) False That applies to: __origin__ __args__ __parameters__ It seems to be not the expected behaviour, so this bug report. If this is not the case, some piece of documentation could be interesting. Also, I couldn't find anything about Generic Alias in the documentation, only in the source code. Should this be addressed too? ---------- assignee: docs@python components: Documentation, Library (Lib) messages: 376873 nosy: AllanDaemon, docs@python priority: normal severity: normal status: open title: Generic Alias attributes nor in dir() type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41780> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com