docopt/docopt — pull request #153 by dmwelch (2013-10-16 22:09:43+00:00)
Title: Format dictionary for key string eval

ENH: Modified Dict() to clean up the keys generated from docopt, i.e. remove '-', '<', '>'. Operations that evaluate the key strings will not throw a syntax error and **kwargs syntax is preserved.

Example:
----------------------------
"""
Usage:
my_test --work

Options:
--work boolean
"""
import docopt

def my_function(work=False):
if work:
print "Do some work!"

if __name__ == "__main__":
kwargs = docopt.docopt(__doc__)
my_function(**kwargs)
----------------------------