[issue22848] Subparser help does not respect SUPPRESS argument

2015-04-15 Thread Matt Long
Matt Long added the comment: Here's a patch for the proposal in my previous comment. As Barry mentioned, it wasn't as straightforward as I had hoped due to parts of the usage text being generated by the state of both self._name_parser_map and self._choices_actions. --

[issue22848] Subparser help does not respect SUPPRESS argument

2015-04-15 Thread Matt Long
Matt Long added the comment: I prefer the idea of help=SUPPRESSED resulting in a "hidden" subcommand. That is, one that does not show up at all in the usage/help output: import argparse parser = argparse.ArgumentParser(prog='myapp') parser.add_argument('--

[issue13549] Incorrect nested list comprehension documentation

2011-12-07 Thread Matt Long
New submission from Matt Long : The description of nesting list comprehensions in section 5.1.5 of the main Python tutorial (http://docs.python.org/tutorial/datastructures.html#nested-list-comprehensions) is misleading at best and arguably incorrect. Where it says "To avoid apprehension