mk wrote:
Hello,
I wrote this class decorator with argument:
The following is a *function* decorator, with the twist of being an
instance of a user class rather than of the built-in function class (one
I had not thought of).
A class decorator would be a callable the modifies or wraps a
On Fri, Jan 16, 2009 at 12:15 PM, mk wrote:
> Hello,
>
> I wrote this class decorator with argument:
>
>>>> class ChangeDoc(object):
>def __init__(self, docstring):
>self.docstring = docstring
>def __call__(self, fun
Hello,
I wrote this class decorator with argument:
>>> class ChangeDoc(object):
def __init__(self, docstring):
self.docstring = docstring
def __call__(self, func):
func.__doc__ = self.docstring
return func
It seem