This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients ncoghlan, productivememberofsociety666, r.david.murray, rhettinger
Date 2015-03-25.23:55:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427327712.6.0.229032010359.issue23764@psf.upfronthosting.co.za>
In-reply-to
Content
Regarding the PyPI decorator module, the difference there is between using a "def f(*args, **kwargs)" wrapper (which requires following wrapper chains to read the signature correctly) and using functools.partial (which reports the correct surface signature directly).

You can define your own wrapper decorators like this to reproduce that behaviour with standard library components:

  def wrapper(func):
    return functools.wraps(func)(functools.partial(func))
History
Date User Action Args
2015-03-25 23:55:12ncoghlansetrecipients: + ncoghlan, rhettinger, r.david.murray, productivememberofsociety666
2015-03-25 23:55:12ncoghlansetmessageid: <1427327712.6.0.229032010359.issue23764@psf.upfronthosting.co.za>
2015-03-25 23:55:12ncoghlanlinkissue23764 messages
2015-03-25 23:55:12ncoghlancreate