Skip to content

Instantly share code, notes, and snippets.

@zzzeek
Created February 10, 2013 16:04
Show Gist options
  • Save zzzeek/4750029 to your computer and use it in GitHub Desktop.
Save zzzeek/4750029 to your computer and use it in GitHub Desktop.
from argparse import ArgumentParser
parser = ArgumentParser(prog='test')
subparsers = parser.add_subparsers()
subparser = subparsers.add_parser("foo", help="run foo")
parser.parse_args()
@JustinAzoff
Copy link

Found the commit that broke it (using git bisect, because hg bisect was being unhelpful):

commit 688e1afe723cbcd7e92912765a2f0a3e133b734d
Author: R David Murray <rdmurray@bitdance.com>
Date:   Thu Jun 9 12:34:07 2011 -0400

    #10424: argument names are now included in the missing argument message

    Fix and initial test patch by Michele Orrù.

which corresponds to changeset: 70741:cab204a79e09

http://hg.python.org/cpython/rev/cab204a79e09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment