Given an instantiated generic class, retrieve the type arguments of itself or its parents.
Project description
generic-args
Given an instantiated generic class, retrieve the type arguments of itself or its parents.
The packages solves the problem described at this StackOverflow question.
Installation
pip install generic-args
Example
Showcase how your project can be used:
from typing import List
from generic_args import generic_type_args
generic_type_args(List[int])
# (<type 'int'>, )
License
Credits
This project was generated with wemake-python-package
. Current template version is: 54efe958f72ac06e912a1423aa14be8b149f988f. See what is updated since then.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
generic-args-0.0.2.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for generic_args-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe7c32b4432408da19af619d14864dcd49bf8b8040dde28ff6038894c62901ff |
|
MD5 | 82693311bf75e72cf27f1972023df4a9 |
|
BLAKE2b-256 | b027a0d63a46dcd4ee096ffee085a5f63c8dce5377760c6d2225990c5ea053f5 |