Issue 6009: optparse docs say 'default' keyword is deprecated but uses it in most examples (original) (raw)
Issue6009
Created on 2009-05-13 05:01 by mallyvai, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg87668 - (view) | Author: Vaibhav Mallya (mallyvai) | Date: 2009-05-13 05:01 |
The first example, and several subsequent examples later on in the optparse docs, use 'default' as an argument, even though it's apparently deprecated in favor of set_defaults. At the risk of overstating the obvious, this seems to be inconsistent. Even the section on defaults http://docs.python.org/library/optparse.html#default-values uses the 'default' keyword without stressing its deprecation. It might make more sense to leave it out of all of the examples altogether, replacing it with the appropriate set_defaults invocations. | ||
msg87673 - (view) | Author: R. David Murray (r.david.murray) * ![]() |
Date: 2009-05-13 10:56 |
Pesonally I would prefer that the deprication be reversed. In most of my optparse use cases it is more convenient than calling set_defaults. In fact, I'm not sure I've ever used set_defaults, though I am glad that it exists since I can certainly envision use cases for it. | ||
msg87880 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2009-05-16 11:19 |
I agree with you, and have removed the deprecation notice in r72677. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:48 | admin | set | github: 50259 |
2009-05-16 11:19:02 | georg.brandl | set | status: open -> closedresolution: fixedmessages: + |
2009-05-13 10:56:42 | r.david.murray | set | nosy: + r.david.murraymessages: + |
2009-05-13 05:01:59 | mallyvai | create |