textwrap.dedent() drops tabs - bug or feature?
Peter Hansen
peter at engcorp.com
Sat Nov 19 16:57:33 EST 2005
Steven Bethard wrote:
> Thanks for double-checking this for me. I looked at expand_tabs, and
> it's part of the definition of the TextWrapper class, which is not
> actually used by textwrap.dedent(). So I think the textwrap.dedent()
> expanding-of-tabs behavior is still basically undocumented.
Ah, good point. I saw dedent() in there with the wrap() and fill()
convenience functions which use a TextWrapper internally, but you're
quite right that dedent() is different, and in fact merely uses the
expandtabs() functionality of the standard string class, so this has
nothing to do with the expand_tabs attribute I pointed out.
-Peter
More information about the Python-list
mailing list