This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author quabla
Recipients bethard, brett.cannon, paul.j3, quabla
Date 2016-03-11.20:46:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457729173.01.0.0727116047132.issue26394@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, a fallback hook at the end of parsing would have to be placed &gt;
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.
History
Date User Action Args
2016-03-11 20:46:13quablasetrecipients: + quabla, brett.cannon, bethard, paul.j3
2016-03-11 20:46:13quablasetmessageid: <1457729173.01.0.0727116047132.issue26394@psf.upfronthosting.co.za>
2016-03-11 20:46:12quablalinkissue26394 messages
2016-03-11 20:46:12quablacreate