Message250353
`get_default` and `set_defaults` are parser methods, and do more than set or get a particular Action attribute. 'Set' for example changes both the 'parser._defaults' attribute, and a 'action.default' attribute. Defaults are complex and can be defined in at least 3 different ways.
'choices' (and other things like 'required', 'nargs', even 'default') is an attribute of a specific Action (argument object). You normally only set these in one way, as parameters of the `add_argument` method.
'action.default' and 'action.choices' are 'public' attributes. 'parser._defaults' is a 'private' attribute. A setter method is the right way to change a 'private' attribute (if needed). It usually isn't need for a 'public' one. |
|
Date |
User |
Action |
Args |
2015-09-10 04:24:08 | paul.j3 | set | recipients:
+ paul.j3, r.david.murray, Sworddragon |
2015-09-10 04:24:08 | paul.j3 | set | messageid: <1441859048.13.0.541137568155.issue25035@psf.upfronthosting.co.za> |
2015-09-10 04:24:08 | paul.j3 | link | issue25035 messages |
2015-09-10 04:24:07 | paul.j3 | create | |
|