Kent Johnson wrote: > Noufal Ibrahim wrote: >> My question is whether this is a valid use for a decorator and whether >> this kind of usage is pythonic. If not, are there any better ways to >> do this? > > It seems like a bit of a hack to me. I guess you change the way you call > run_command to include desc?
Yes. That was the plan. I'd set some keyword arguments that would be "reserved" for the decorator rather than the function itself. > You could add another parameter to profile() which says whether to > include parameters (or how many parameters) in the output. Something like Thanks Kent. That would keep my original functions unaware that they're being "decorated". I think it's better. -- ~noufal _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor