[issue8979] OptParse __getitem__

2010-06-12 Thread Éric Araujo
Éric Araujo added the comment: Don’t hesitate to propose future ideas to the python-ideas mailing list http://mail.python.org/mailman/listinfo/python-ideas -- resolution: -> rejected stage: -> committed/rejected ___ Python tracker

[issue8979] OptParse __getitem__

2010-06-12 Thread Bryan Ward
Bryan Ward added the comment: Thanks for your help and I apologize for the unnecessary ticket. I was unfamiliar with vars() which seems to accomplish what I wanted. -- status: open -> closed ___ Python tracker __

[issue8979] OptParse __getitem__

2010-06-12 Thread Steven Bethard
Steven Bethard added the comment: Given that the one obvious way of using dict-style syntax given a Python object is to call vars(), I thing adding a __getitem__ is probably a bad idea. -- ___ Python tracker _

[issue8979] OptParse __getitem__

2010-06-12 Thread R. David Murray
Changes by R. David Murray : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue8979] OptParse __getitem__

2010-06-12 Thread Éric Araujo
Éric Araujo added the comment: Thanks for your report and your ideas for Python :) Some remarks: 1) New features have to target 3.2; 2.6 is the current stable version (only security and documentation fixes) and 2.7 is to be released really soon (end of the 2.x line); 2) Can you explain why

[issue8979] OptParse __getitem__

2010-06-11 Thread Bryan Ward
New submission from Bryan Ward : It would be convenient to be able to access the resultant options from optparse using the syntax options['some_option'] 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 t