Python module to keep function signature introspection compatibility between python version
Project description
contrat
Simple python module to keep function signature introspection compatibility between python versions
Install
pip install contrat
Usage
The following example work for python 2.7 and python 3.0+:
#!/usr/bin/python
from contrat import getargspec
def sample(arg1, arg2=True, arg3=1):
pass
print(str(getargspec(sample)))
# will display
# ArgSpec(args=['arg1', 'arg2', 'arg3'], varargs=None, keywords=None, defaults=(False, 1))
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
contrat-0.1.0.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for contrat-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23e0d656f678e9f53165794f45658117517d1048d05b7c7ba782e30fabca6932 |
|
MD5 | b79a3ce074afb9ce3f62c0f5391fda48 |
|
BLAKE2b-256 | 052cf1dd7ac82905507d9532796e7540193991cf007b9cb86ba2702503d414f4 |