Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Let your decorations be undone

Project Description

Let your decorations be undone


$ pip install undecorate


>>> 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

Release History

This version
History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.9 kB) Copy SHA256 Hash SHA256
Wheel 3.4 Sep 30, 2014
(4.3 kB) Copy SHA256 Hash SHA256
Source None Sep 30, 2014

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers