diff options
author | Ivan Levkivskyi <levkivskyi@gmail.com> | 2019-05-31 00:10:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-31 00:10:07 +0100 |
commit | 4c23aff065fb28aba789a211937a2af974842110 (patch) | |
tree | f6f2757eb59d315e2835f7dcf8b2f1b7f18506ea /Modules/_sha3/sha3module.c | |
parent | bpo-5028: Fix up rest of documentation for tokenize documenting line (GH-13686) (diff) | |
download | cpython-4c23aff065fb28aba789a211937a2af974842110.tar.gz cpython-4c23aff065fb28aba789a211937a2af974842110.tar.bz2 cpython-4c23aff065fb28aba789a211937a2af974842110.zip |
bpo-29262: Add get_origin() and get_args() introspection helpers to typing (GH-13685)
This is an old feature request that appears from time to time. After a year of experimenting with various introspection capabilities in `typing_inspect` on PyPI, I propose to add these two most commonly used functions: `get_origin()` and `get_args()`. These are essentially thin public wrappers around private APIs: `__origin__` and `__args__`.
As discussed in the issue and on the typing tracker, exposing some public helpers instead of `__origin__` and `__args__` directly will give us more flexibility if we will decide to update the internal representation, while still maintaining backwards compatibility.
The implementation is very simple an is essentially a copy from `typing_inspect` with one exception: `ClassVar` was special-cased in `typing_inspect`, but I think this special-casing doesn't really help and only makes things more complicated.
Diffstat (limited to 'Modules/_sha3/sha3module.c')
0 files changed, 0 insertions, 0 deletions