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 details)
Built Distribution
File details
Details for the file generic-args-0.0.1.tar.gz
.
File metadata
- Download URL: generic-args-0.0.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/3.8.6 Linux/5.4.0-65-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
0a2d51b08bf9cf7225450f7f08c6505e4248f9c71aefd00137ebc87b12ff8d47
|
|
MD5 |
569153bdd65a0e30cb704cfc8a322ad9
|
|
BLAKE2b-256 |
fc0cc8c6793d016b4ae2c280dc24337e4d9892f198d04c6b013c25d99542e0f3
|
File details
Details for the file generic_args-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: generic_args-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.3 CPython/3.8.6 Linux/5.4.0-65-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7a9e6c7c87ead45038eb7f02c03c0725be36d488730f5a78a705628cf1aa3c4f
|
|
MD5 |
768ba3d746469e09bdcd7a23bebdeb78
|
|
BLAKE2b-256 |
cbc269b87d15588a382443c64038bc0d3cc23b46d6dd25161dd34bf417446c04
|