docstringargs: Python module for setting up argparse

Paul Rubin at nospam.invalid
Tue Apr 21 08:46:01 CEST 2015

Chris Angelico <rosuav at> writes:
> Ow, this is getting extremely complicated. And you still haven't
> actually answered the fundamental problem, which is: When will you
> need this? When will you actually want to put two different
> annotations onto the same function's parameters?

You've posted this cool annotation for docstringargs: why shouldn't I
want to use it?  And PEP 0484 is about annotations for type checking,
also cool.  Why shouldn't I want to use that too?

> A similar consideration applies to a class's metaclass.

I'm not much of a believer in metaclasses (or classes for that matter)
but was trying to figure out a method to see all the decorators on a
function, and the metaclass seemed like a possibility.

> The language isn't going to get any type checking.

I thought it was one of the motivations for annotations.  PEP 0484

    ... the proposal assumes the existence of a separate off-line type
    checker which users can run over their source code voluntarily.

That sounds like Erlang's Dialyzer, which is pretty useful and
successful.  So it seems like a good idea to me.

More information about the Python-list mailing list