[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-23 Thread paul j3
paul j3 added the comment: argparse does import 'textwrap', but as '_textwrap', so it could be used with: argparse._textwrap.dedent(...) Importing your own is cleaner. -- nosy: +paul.j3 ___ Python tracker

[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-20 Thread Chris Kessler
Chris Kessler added the comment: Thanks for the quick response! I didnt see it anywhere in the documentation on that page so I assumed it was built in with argparse. Thanks! -- ___ Python tracker

[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-20 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks for the report. To make it work, you'll have to import textwrap first. We don't always add all the necessary imports in our code snippets and examples, and we don't need to start adding imports into code examples either. So I'm closing this issue.

[issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

2018-07-20 Thread Chris Kessler
New submission from Chris Kessler : In document https://docs.python.org/2/library/argparse.html#argparse.RawDescriptionHelpFormatter this will fail with NameError: global name 'textwrap' is not defiend >>> parser = argparse.ArgumentParser( ... prog='PROG', ...