[Twisted-Python] usage.Options

Moshe Zadka m at moshez.org
Fri Oct 4 04:08:59 EDT 2002


On Fri, 4 Oct 2002, Andrew Bennetts <andrew-twisted at puzzling.org> wrote:

>     o.parseOptions(["--user", "boss", "--password", "sekrit"])
...
>     updateApplication(app, Options(user='boss', password='sekrit'))

What if he wanted to use some yes/no option?

> i.e. let usage.Options' __init__ take a **kwargs, and have it pass that
> to parseOptions.  It seems to me that constructing and configuring an
> Options instance at the same time is a natural thing to do.
> 
> Does this sound like a good idea?

Personally, I don't like it.




More information about the Twisted-Python mailing list