> En Tue, 04 Sep 2007 19:29:11 -0300, Daniel Larsson > <[EMAIL PROTECTED]> escribi?: > > > > > On 9/5/07, Ferenczi Viktor <[EMAIL PROTECTED]> wrote: > > >> > > @functools.wraps(f) > >> > > Pass the function to be wrapped by the decorator to the wraps > >> function. > >> > Ooops, right. That doesn't change the fact that decorated functions > >> get > >> > hidden from doctest though. > > > I have no issue when the decorator is defined in the same module as the > > decorated function, my problem is running doctests on functions using an > > imported decorator. Having to implement the decorator in every source > > module > > isn't very practical.
I cannot reproduce your problem. Using functools.wraps the __module__ attribute is set correctly and everything works, even for decorators defined in separated modules. Care to post a complete example of what you are doing? Michele Simionato P.S. for some reason your messages are not appearing on Google groups, I see only the replies. -- http://mail.python.org/mailman/listinfo/python-list