Message187031
Thanks for the suggested. Here's a revised wording and a slightly more legible example:
Return a copy of the string where all tab characters are replaced by zero or
more spaces, depending on the current tab column and the given tab size.
Starting at the first character of the string, the tab column is set to
zero. Whenever a tab character (``\t``) is encountered, space characters
are inserted as needed until the next tab position is reached and the tab
column is set to that tab position; the tab character itself is not copied.
Whenever a newline character (``\n`` or ``\r``) is encountered, it is copied
and the tab column is reset to zero. Any other character is copied unchanged
and the tab column is incremented by one regardless of how it may be
represented when printed. If *tabsize* is not given, a tab size of 8
characters is assumed.
>>> '012\t4\t89'.expandtabs(4)
'012 4 89' |
|
Date |
User |
Action |
Args |
2013-04-15 21:02:03 | ned.deily | set | recipients:
+ ned.deily, ezio.melotti, roger.serwy, eli.bendersky, docs@python, asolano |
2013-04-15 21:02:03 | ned.deily | set | messageid: <1366059723.18.0.306365979506.issue17670@psf.upfronthosting.co.za> |
2013-04-15 21:02:03 | ned.deily | link | issue17670 messages |
2013-04-15 21:02:03 | ned.deily | create | |
|