John O'Hagan a écrit :
Hello,

I've recently found it convenient to do something like this:

(snip)
In other words, using the optparse object to hold as attributes everything needed by all the functions and methods in the module, and simply passing it holus bolus to all them and just pulling out what's actually needed inside the function, even adding new attributes or reassigning old ones along the way.

Congratulations, you just reinvented globals and spaghetti-code.

(snip)


My question is: is this horribly inefficient or otherwise wrong?


The only thing I can say is that I hope I'll *never* have to maintain your code.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to