Message226706
One way to reduce the testing burden, and to be extra safe regarding backward compatibility is to make this action optional, rather than the default.
For example, make `_prog_name` importable (i.e. change the name), and then expect the user to use it explicitly with:
parser = argparse.ArgumentParser(prog=argparse.prog_name(), ...)
and leave the `parse_args` stack unchanged.
This would require an addition to the documentation. The user can then check for themselves whether `prog_name` gets the right name, given their packaging and calling method. It's a little more work for a package creator, but arguably it's a good thing to aware of.
The added tests, if any, can focus on the output of this function, rather than the output of the 'print_help'. |
|
Date |
User |
Action |
Args |
2014-09-10 18:52:57 | paul.j3 | set | recipients:
+ paul.j3, tebeka, ncoghlan, peter.otten, bethard, BreamoreBoy |
2014-09-10 18:52:57 | paul.j3 | set | messageid: <1410375177.56.0.348115714192.issue22240@psf.upfronthosting.co.za> |
2014-09-10 18:52:57 | paul.j3 | link | issue22240 messages |
2014-09-10 18:52:57 | paul.j3 | create | |
|