[New-bugs-announce] [issue34174] argparse formatter_class issue for RawDescriptionHelpFormatter

Chris Kessler report at bugs.python.org
Fri Jul 20 16:34:50 EDT 2018


New submission from Chris Kessler <chriskesslergrfx at gmail.com>:

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',
...     formatter_class=argparse.RawDescriptionHelpFormatter,
...     description=textwrap.dedent('''\
...         Please do not mess up this text!
...         --------------------------------
...             I have indented it
...             exactly the way
...             I want it
...         '''))

----------
assignee: docs at python
components: Documentation
messages: 322034
nosy: ckessler, docs at python
priority: normal
severity: normal
status: open
title: argparse formatter_class issue for RawDescriptionHelpFormatter
type: resource usage
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34174>
_______________________________________


More information about the New-bugs-announce mailing list