Skip to content

Instantly share code, notes, and snippets.

@legnaleurc
Created September 22, 2014 16:16
Show Gist options
  • Save legnaleurc/550295b7cca785305b24 to your computer and use it in GitHub Desktop.
Save legnaleurc/550295b7cca785305b24 to your computer and use it in GitHub Desktop.
argparse bug
from __future__ import unicode_literals
from __future__ import print_function
import argparse
a = argparse.ArgumentParser()
b = a.add_subparsers(dest='command')
b.add_parser('test')
c = a.parse_args([])
print(c.command is None)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment