Peter Otten <[EMAIL PROTECTED]> writes:
[...]
> Not sure if this is better, but you can use OptionParser to set attributes
> on arbitrary objects, including your Processor instance:
[...]

I'd guess it's not worth the mental overhead required when you
discover the next argument no longer fits this scheme.  Or the mess
when you start lying to yourself about what the interface of Processor
should be, just so you can implement it like this.

Still, better than just passing 'options' (from options, args =
parser.parse_args()) to all your functions / classes, which... well,
only makes sense if you get paid by the hour, and think that way, too
;-)


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

Reply via email to