optparse: Why does this syntax work and not another?

Peter Otten __peter__ at web.de
Mon Jul 5 02:43:42 EDT 2004


washu wrote:

> optparse.OptionParser().add_option( . . .)
Here you create an OptionParser instance and add one options

> (options, args) = optparse.OptionParser().parse_args( . . . )

Here you create a NEW OptionParser instance with no options and feed the
arguments to it.

Peter





More information about the Python-list mailing list