[issue7636] Add a set update action to optparse

2010-01-07 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I'm not sure how much value this adds, given that you can just call set() on the list resulting from append actions. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org

[issue7636] Add a set update action to optparse

2010-01-07 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: I think it's overkill, especially given the easy alternatives. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7636 ___

[issue7636] Add a set update action to optparse

2010-01-07 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- priority: - low resolution: - rejected stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7636

[issue7636] Add a set update action to optparse

2010-01-05 Thread steven Michalske
steven Michalske smichal...@gmail.com added the comment: Agreed, add is the correct word, I used update because i created a set from the list that optarg created with append. -- ___ Python tracker rep...@bugs.python.org

[issue7636] Add a set update action to optparse

2010-01-05 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: After looking into it, I'm thinking this may be better off as a custom option inherited from optparse.Option. I already wrote the patch since it was small and a way to poke around optparse some more, so we'll see if anyone else likes the idea.

[issue7636] Add a set update action to optparse

2010-01-05 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: custom_add.py gives an example of how you could complete this on your own without a change to optparse. Running custom_add.py -a foo -a bar -a foo should print out set(['foo', 'bar']) - ultimately the same thing. -- Added file:

[issue7636] Add a set update action to optparse

2010-01-04 Thread steven Michalske
New submission from steven Michalske smichal...@gmail.com: As a complement to the append action, an update action would update a set with new values. update update a set with this option’s argument justification: adding email addresses at the command line, makes it less code to have a unique

[issue7636] Add a set update action to optparse

2010-01-04 Thread Brian Curtin
Brian Curtin cur...@acm.org added the comment: The name should probably be add rather than update, sticking with the name of the action being done on the underlying set (as update takes an iterable). Agree/disagree? I need to add tests and docs to the patch I wrote up - I'll put it up here