pwclient handling of argparse options

Mike Frysinger vapier at gentoo.org
Sat Oct 17 13:25:54 AEDT 2015


On 16 Oct 2015 16:39, Brian Norris wrote:
>          commit_str = args.get('c')

if you feel like cleaning things up, i find the args behavior weird and
non-standard.  it does:
	args = action_parser.parse_args()
	args = dict(vars(args))
	action = args.get('subcmd')

normally argparse code does:
	args = action_parser.parse_args()
	action = args.subcmd

i'm not sure why this dict/get style was picked.  maybe Bernhard can
shed some light here.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/patchwork/attachments/20151016/fa8b4a20/attachment.sig>


More information about the Patchwork mailing list