"Brett Cannon" <brett at python.org> wrote: > > With the discussion of a possible @decorator to help set the metadata > of the decorator to that of what the wrapped function has, I had an > idea that I wanted to toss out there (this dicussion stems from a blog > post I made: http://sayspy.blogspot.com/2006/03/how-to-handle-object-identity-issues.html). [snip] Edward Loper suggested this way back on September 5, 2004. http://mail.python.org/pipermail/python-dev/2004-September/048626.html I was and continue to be +1 on this, though I would go farther and state, like I did at the time, that one shouldn't copy any of the function attributes, they should come 'free', similar to the way that class attributes are 'free' on subclasses. http://mail.python.org/pipermail/python-dev/2004-September/048631.html What would make this _really_ nice is if one didn't need to do anything manually; that the attribute that pointed to the decorated function/object would be automatically applied - though I realize that this may not be generally possible. - Josiah
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4