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.1.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for generic_args-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a9e6c7c87ead45038eb7f02c03c0725be36d488730f5a78a705628cf1aa3c4f |
|
MD5 | 768ba3d746469e09bdcd7a23bebdeb78 |
|
BLAKE2b-256 | cbc269b87d15588a382443c64038bc0d3cc23b46d6dd25161dd34bf417446c04 |