[Python-Dev] Proposed tweaks to functools.wraps

Terrence Cole terrence at zettabytestorage.com
Thu Aug 12 00:58:46 CEST 2010


On Wed, 2010-08-11 at 13:10 +1000, Nick Coghlan wrote:
> On Wed, Aug 11, 2010 at 12:39 PM, Benjamin Peterson <benjamin at python.org> wrote:
> > which would require ignoring the absence of __annotations__.
> 
> It turns out the patch that added __annotations__ support also made a
> change to make all of the copied attributes optional.

The discussion happened on issue 8814.  I initially made only
__annotations__ optional, however, after finding issue 1576241 on the
tracker and thinking about it a bit, making all of the annotations
optional seemed like the only sane solution.

http://bugs.python.org/issue8814
http://bugs.python.org/issue1576241

> So I'll be tidying up the implementation of that, extending it to the
> updated attributes and adding unit tests to make sure they're all
> optional.
> 
> Cheers,
> Nick.
> 
--
Terrence



More information about the Python-Dev mailing list