docstringargs: Python module for setting up argparse

Chris Angelico rosuav at gmail.com
Wed Apr 22 00:43:01 EDT 2015


On Wed, Apr 22, 2015 at 2:00 PM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> On Tue, Apr 21, 2015 at 12:59 AM, Chris Angelico <rosuav at gmail.com> wrote:
>> plus, docstringargs
>> basically implies that all the function parameters are strings, so the
>> annotations are going to be rather less useful.
>
> Why is that? argparse supports non-string args, so why couldn't
> docstringargs as well?

Simplicity. There are a ton of things you _could_ do with argparse,
but if you want all that flexibility, you're welcome to use argparse
itself. Adding too much into the docstring (or annotation, even more
so) just clutters things. The one thing docstringargs does support of
non-string args is optional args that default to False and are
store_true (ie booleans).

ChrisA



More information about the Python-list mailing list