Re: Class decorator with argument

2009-01-16 Thread Terry Reedy
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 *cl

Re: Class decorator with argument

2009-01-16 Thread Chris Rebert
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, func): >func.__doc__ = self.docstring