Message261599
Yes, a fallback hook at the end of parsing would have to be placed >
before the 'required' testing, not after as in my 'group' testing.
Just to clarify: Would you suggest that a fallback call returns the
parsed value (i.e. the fallback calls the action or alike) or
`take_action` is called on fallback values after all the other calls are
done?
I will try to look into your hook system in detail. Maybe you are right
and the ideas can be combined nicely.
> I still haven't absorbed why this patch is superior to the
> ConfigArgParse approach, or chaining dictionary values after parsing.
Problems with ConfigArgParse I found: It ignores config and env vars
completely if "--" is used on the command line. Implementing positional
arguments supplied via config or env var is impossible.
Chaining dictionary would require that all arguments are optional. I
think that the "make everything optional" approach bypasses to many
features of argparse.
> I'd also suggest following its example in published this enhancement
> in your own repository and pypi.
Thanks for the suggestion. I will surely consider this. |
|
Date |
User |
Action |
Args |
2016-03-11 20:46:13 | quabla | set | recipients:
+ quabla, brett.cannon, bethard, paul.j3 |
2016-03-11 20:46:13 | quabla | set | messageid: <1457729173.01.0.0727116047132.issue26394@psf.upfronthosting.co.za> |
2016-03-11 20:46:12 | quabla | link | issue26394 messages |
2016-03-11 20:46:12 | quabla | create | |
|