[New-bugs-announce] [issue35612] Text wrap over text containing tab character
Devika Sondhi
report at bugs.python.org
Sat Dec 29 06:48:17 EST 2018
New submission from Devika Sondhi <devikas at iiitd.ac.in>:
textwrap.wrap does not seem to preserve tab character ('\t') in the text if it is not separated from other characters by a space.
Example:
>>> textwrap.wrap("Here is\tone line of text that is going to be wrapped after 20 columns.",20)
['Here is one line of', 'text that is going', 'to be wrapped after', '20 columns.']
The tab is missing from the above output.
However, for text with \t separated by space, the behavior is as expected (shown below).
>>> textwrap.wrap("Here is \t one line of text that is going to be wrapped after 20 columns.",20)
['Here is one', 'line of text that is', 'going to be wrapped', 'after 20 columns.']
----------
components: Tests
messages: 332712
nosy: Devika Sondhi
priority: normal
severity: normal
status: open
title: Text wrap over text containing tab character
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35612>
_______________________________________
More information about the New-bugs-announce
mailing list