8000 Automatically search for docstrings · Pull Request #5 · docopt/docopt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Automatically search for docstrings #5

New issue
Closed
wants to merge 1 commit into from
Closed

Automatically search for docstrings #5

wants to merge 1 commit into from

Conversation

ghost
Copy link
@ghost ghost commented Apr 13, 2012

This makes the doc argument optional, and adds a little magic to search for the docstring. Makes the simple case simpler, and doesn't complicate the existing use case.

@keleshev
Copy link
Member

I don't think it's a good idea. "Explicit is better than implicit". For me passing __doc__ is simple enough.

Although, I must admit, I thought that what you did is impossible without a macro-system. Seeing this, I probably should reconsider how I obtain docstrings in another project (https://github.com/halst/pep257).

If you have more ideas, we can discuss them. I'm working now on a pattern-matching (https://github.com/halst/docopt/blob/pattern-matching/docopt.py), which should allow to match usage (like prog.py (-a | -b) N [N ...] against prog.py -a 10).

@keleshev keleshev closed this Apr 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0