[issue35612] Text wrap over text containing tab character

2018-12-29 Thread Devika Sondhi
Devika Sondhi added the comment: I wasn't aware of this. Thanks for clarifying -- stage: -> resolved status: open -> closed ___ Python tracker ___

[issue35612] Text wrap over text containing tab character

2018-12-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: I think you may be misunderstanding what you are seeing. The documentation for textwrap.wrap says: By default, tabs in 'text' are expanded with string.expandtabs() which converts tabs to one or more spaces, enough to align to some multiple of column

[issue35612] Text wrap over text containing tab character

2018-12-29 Thread Devika Sondhi
New submission from Devika Sondhi : 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)