[New-bugs-announce] [issue29290] argparse breaks long lines on NO-BREAK SPACE

Steven D'Aprano report at bugs.python.org
Mon Jan 16 22:08:41 EST 2017


New submission from Steven D'Aprano:

argparse help incorrectly breaks long lines on U+u00A0 NO-BREAK SPACE.

The attached script has been run on Python 3.5.3rc1 in a terminal window 80 columns wide, and it produces output::

    usage: argparse_nobreak.py [-h] [--no-condensedxxxx]

    optional arguments:
      -h, --help          show this help message and exit
      --no-condensedxxxx  Disable default font-style: condensed. Also disables "M+
                          1M" condensed monospace.


I expected the last line should have broken just before the "M+ 1M", rather than in the middle.

See also #20491.

----------
components: Library (Lib)
files: argparse_nobreak.py
messages: 285607
nosy: steven.daprano
priority: normal
severity: normal
status: open
title: argparse breaks long lines on NO-BREAK SPACE
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file46310/argparse_nobreak.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29290>
_______________________________________


More information about the New-bugs-announce mailing list