undecorate
Let your decorations be undone
Installation
$ pip install undecorate
Usage
>>> from undecorate import unwrap, unwrappable
>>>
>>> @unwrappable
... def pack(func):
... def wrapper(args, kwargs):
... return func(*args, **kwargs)
... return wrapper
...
>>> @pack
... def myfunc(a, b=None, c=None):
... return (a, b, c)
...
>>> myfunc('a', b='b')
Traceback (most recent call last):
...
TypeError: wrapper() got an unexpected keyword argument 'b'
>>>
>>> unwrap(myfunc)('a', b='b')
('a', 'b', None)
0.2.1 (2014-09-29)
Fix bug in create_class_wrapper and class_wraps that caused them to always throw an error when used.
Remove CLASS_WRAPPER_DELETES, and corresponding deleted arguments on create_class_wrapper and class_wraps.
0.2 (2014-09-29)
Add create_class_wrapper and class_wraps.
Internally use __wrapped__ to match Python 3.2+.
Add backport versions of functools wraps and update_wrapper. They wrap the stdlib versions, and ensure that __wrapped__ is set.
0.1 (2014-09-04)
Initial Release
unwrappable and unwrap functions
Metadata
Release files for undecorate 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| undecorate-0.2.1.tar.gz | 4.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| undecorate-0.2.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 9.2 kB
Release files / undecorate-0.2.1.tar.gz
| Download URL | undecorate-0.2.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d56c72b375dccc69389065e8f3a29f38e625769308f40d4ceb56b20cdde7fc1b
|
|
BLAKE2b-256 checksum How to use checksums |
9c5c9a61620695c69de007d054390b4c972da4a42b21c24917a4a1678f5cd409
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / undecorate-0.2.1-py2.py3-none-any.whl
| Download URL | undecorate-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b221138176aeeafb7e121589b0829f8ba121e9e5320db569ce0173db771328ba
|
|
BLAKE2b-256 checksum How to use checksums |
7b91d48dfb3830de993c3012cf627d06314ee9a82e2e95c0eff5415f76b2a22c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for undecorate 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.