I love the decorator in Python!!!

Robert Kern robert.kern at gmail.com
Fri Dec 9 05:08:08 EST 2011


On 12/9/11 5:02 AM, alex23 wrote:
> On Dec 9, 2:38 am, Chris Angelico<ros... at gmail.com>  wrote:
>> One piece of sophistication that I would rather like to see, but don't
>> know how to do. Instead of *args,**kwargs, is it possible to somehow
>> copy in the function's actual signature? I was testing this out in
>> IDLE, and the fly help for the function no longer gave useful info
>> about its argument list.
>
> The 3rd party 'decorator' module takes care of issues like docstrings
> &  function signatures. I'd really like to see some of that
> functionality in the stdlib though.

Much of it is:

   http://docs.python.org/library/functools#functools.update_wrapper

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list