On Tue, 27 Oct 2009 10:43:42 -0700, Felipe Ochoa wrote:
> I need to create a subclass from a parent class that has lots of
> methods, and need to decorate all of these. Is there pythonic way of
> doing this other than:
>
> def myDecorator (meth):
> @wraps(meth)
> def newMeth (*args, **kw)
Felipe Ochoa wrote:
> I need to create a subclass from a parent class that has lots of
> methods, and need to decorate all of these. Is there pythonic way of
> doing this other than:
>
> def myDecorator (meth):
> @wraps(meth)
> def newMeth (*args, **kw):
> print("Changing some arg
I need to create a subclass from a parent class that has lots of
methods, and need to decorate all of these. Is there pythonic way of
doing this other than:
def myDecorator (meth):
@wraps(meth)
def newMeth (*args, **kw):
print("Changing some arguments here.")
return meth(ne