[docs] [issue13540] Document the Action API in argparse

Terry J. Reedy report at bugs.python.org
Wed Dec 14 06:25:27 CET 2011

Terry J. Reedy <tjreedy at udel.edu> added the comment:

My guess from the way the docs are written now is that subclassing from Action and over-riding just the __call__ method is the intended way, not just the recommended. If so, Action is a quasi-private class, only exposed so it could be subclassed with one method given. And if so, one could question whether anything more need be documented.

However, in your patch, you write

"+Many actions also override the ``__init__`` method, validating the parameters to the argument definition and raising a ValueError or other Exception on failure."

What 'many actions' are you referring to? Ones you have written, by referring to the code? Ones you think might be written if the doc were added?

In any case, I would prefer input from Stephen before we expose and thereby freeze the __init__ signature.


Python tracker <report at bugs.python.org>

More information about the docs mailing list