[New-bugs-announce] [issue8979] OptParse __getitem__

Bryan Ward report at bugs.python.org
Sat Jun 12 03:04:24 CEST 2010

New submission from Bryan Ward <bward1 at gmail.com>:

It would be convenient to be able to access the resultant options from optparse using the syntax


instead of options.some_option

Or additionally it would be nice to have a way to produce a dictionary of the options.  This would be nice to have to do something to the effect of

dictOptions = options.to_dict()

obj = SomeObject(**dictOptions)

components: Extension Modules
messages: 107620
nosy: bcward
priority: normal
severity: normal
status: open
title: OptParse __getitem__
type: feature request
versions: Python 2.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list