docopt/docopt — pull request #63 by raskug (2012-10-17 03:47:26+00:00)
Title: Improved error messages and DocoptExit

Error messages fixed pursuant of #43. There's also a new method, `docopt.exit()`, that behaves exactly like `sys.exit()` when called with `None` or an integer argument, but prepends the argument with the program name and appends it with an usage message when called with anything else. `DocoptExit` was changed to reflect this. (The program name is read from the docstring, not `sys.argv[0]`.)

I also changed the error message given on a failed usage pattern match to `missing operand(s)`, as `missing operand` is what GNU programs say when you give them too few arguments. This probably still needs improvement, because a pattern mismatch can also happen in a few corner cases where there is technically no "missing operand", I think.