Message26904
| Author |
rhettinger |
| Recipients |
| Date |
2005年11月20日.04:52:00 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Logged In: YES
user_id=80475
After more thought, I think the expandtabs() is a bug since
it expands content tabs as well as margin tabs:
>>> textwrap.dedent('\tABC\t\tDEF')
'ABC DEF'
This is especially problematic given that dedent() has to
guess at the tab size.
If this gets fixed, I recommend using regular expressions as
a way to indentify common margin prefixes on non-empty
lines. This will also mixes of spaces and tabs without
altering content with embedded tabs and without making
assumptions about the tab size. Also, it ought to run
somewhat faster. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 14:36:20 | admin | link | issue1361643 messages |
| 2007年08月23日 14:36:20 | admin | create |
|