Not good to have runtime behavior depend on the docstring because -O0 can optimize docstrings out of the file and also because it gives people the willies
Might confuse people who've never seen it before
docopt is guessing what my usage/help string means and it's not good to have it guess
1 is silly, just move the usage/help string out of the docstring. Problem solved.
As for #2 it's pretty hard to fix stupid. So... yep.
3 is just plain wrong. docopt is parsing the usage/help strings based on a well defined DSL.
As long as the DSL is solid I think it's a great idea and I'm amazed that it's taken this long for someone to come up with it.
15
u/pythor Aug 15 '13
Saw this a while back, just remembered it today when thinking about a new script I'm working on. Couldn't find it in reddit, so I figured I'd share.