On Sun, Mar 19, 2006, Brett Cannon wrote: > > I guess we need to decide if we want to promote the copying of > metadata from the decorated function into the decorator or not.
Short answer: absolutely yes I had to deal with a related issue recently, where embedded doctests no longer worked on the decorated function. There were two separate problems: the first was non-copying of __doc__, which was easy enough to fix; the second (which I still haven't fixed) is the fact that __name__ wasn't set, so doctest didn't auto-find the function. (The decorator came from a different module.) (This was Python 2.2/2.3, so decorators weren't actually involved, but I think it's the same problem.) I don't understand decorators well enough to propose a good solution given the other constraints, but it seems clear to me that we need a good solution of some kind. -- Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/ "19. A language that doesn't affect the way you think about programming, is not worth knowing." --Alan Perlis _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com