Re: [Tutor] Decorators and function arguments.

2007-09-19 Thread Noufal Ibrahim
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

Re: [Tutor] Decorators and function arguments.

2007-09-19 Thread Kent Johnson
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? You could add a

[Tutor] Decorators and function arguments.

2007-09-19 Thread Noufal Ibrahim
Hello everyone, I have a question regarding the use of some decorators. In my program, I have functions like this def process_command_line(...): ... def run_command(...): ... def update_db(...): ... These functions are for various stages of the program. Now, I need to