Ben Finney added the comment:

Oz Tiram wrote:

> I doubt if the correct place for formatting a man page should be in 
> argparse.py itself. My solution is an extension of Andial's brecht solution

Thank you for that, Oz.

I see an easy seam to refactor this work into separate concerns.

The formatting of a man page from the parser for the command, can be coupled to 
the ‘argparse’ module since it is dependent only on an ArgumentParser plus some 
extra properties for populating the man page.

The building of one man page should not, IMO, be so tightly coupled to a Python 
distribution. There may be several different commands installed by one 
distribution. Each man page's fields should mostly come from the parser for the 
command, not from the distribution metadata. Instead, the build process should 
be told which parser to use for generating each of the man pages.

I propose to work on Oz's module and produce a man page formatter for exactly 
one ArgumentParser, as an enhancement for ‘argparse’.

----------
nosy: +bignose

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14102>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to