Decorator Base Class: Needs improvement.

El Pitonero pitonero at gmail.com
Tue Apr 5 22:28:55 EDT 2005


Scott David Daniels wrote:
> Ron_Adam wrote:
> > ...
>
>      def tweakdoc(name):
>          def decorator(function):
> 	    function.__doc__ = 'Tweak(%s) %r' % (name, function.__doc__)
> 	    return function
>          return decorator
>
> What is confusing us about what you write is that you are referring
to
> tweakdoc as a decorator, when it is a function returning a decorator.

"Decorator factory" would be a shorter name for "a function returning a
decorator".




More information about the Python-list mailing list