nodeca/argparse — pull request #9 by benblank (2012-07-26 20:10:06+00:00)
Title: Fefault for addHelp parameter is incorrect

The default to the `addHelp` parameter for `ArgumentParser` is false, but is documented as true; the default in Python argparse is also True.

Test case in node:

#!/usr/bin/env node

var argparse = require("argparse");

(new argparse.ArgumentParser()).printHelp();

// usage: defaultHelp.js
//

Test case in Python:

#!/usr/bin/env python

import argparse

argparse.ArgumentParser().print_help()

# usage: default_help.py [-h]
#
# optional arguments:
# -h, --help show this help message and exit
#

The commit in this pull request will cause `addHelp` to default to true IFF its type is `unknown`; otherwise, it will use its value as a boolean.