optparse: Why does this syntax work and not another?

Peter Otten __peter__ at web.de
Mon Jul 5 08:43:42 CEST 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