>>> x = TextWrapper()
>>> x.wrap('This is a sentence that will not wrap')
['This is a sentence that will not wrap']
>>> x.wrap(' This is a sentence that will not wrap')
[' This is a sentence that will not wrap']
>>> x.wrap('This is a sentence that will wrap because I have added a bunch of words to it until it is longer than 70 chars.')
['This is a sentence that will wrap because I have added a bunch of', 'words to it until it is longer than 70 chars.']
>>> x.wrap(' This is a sentence that will wrap because I have added a bunch of words to it until it is longer than 70 chars.')
['This is a sentence that will wrap because I have added a bunch of', 'words to it until it is longer than 70 chars.']
To me, this looks like a bug. It violates POLA, anyway (took me a while
to figure out why one paragraph and only one paragraph in my output
was indented more than the rest).
|