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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file generic-args-0.0.2.tar.gz.
File metadata
- Download URL: generic-args-0.0.2.tar.gz
- Upload date:
- Size: 3.9 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 |
6b36863f307a244124e8958b4b77435b826ccbe4aa46481130b374f42350643d
|
|
| MD5 |
014011af0f48e7410654ec72e00d02a0
|
|
| BLAKE2b-256 |
b795865de82dfa5175db54e41d27e3eccc9b9cb88e29fef8e78cbed740510083
|
File details
Details for the file generic_args-0.0.2-py3-none-any.whl.
File metadata
- Download URL: generic_args-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.3 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 |
fe7c32b4432408da19af619d14864dcd49bf8b8040dde28ff6038894c62901ff
|
|
| MD5 |
82693311bf75e72cf27f1972023df4a9
|
|
| BLAKE2b-256 |
b027a0d63a46dcd4ee096ffee085a5f63c8dce5377760c6d2225990c5ea053f5
|