Parsing Indented Text (like parsing Python)

Gabriel Genellina gagsl-py2 at
Sun Mar 11 18:12:06 CET 2007

En Sun, 11 Mar 2007 13:12:20 -0300, Paul McGuire <ptmcg at>  

> On Mar 11, 8:37 am, "Gabriel Genellina" <gagsl-... at>
> wrote:

>> If you mix tabs+spaces, Python simple replaces each tab by 8 spaces.

> As I recall, the number of spaces to replace a tab by is something
> like 8-(col % 8) where col is the column location of the tab with the
> left most column being 0.

Yes, each tab advances to the next multiple-of-8 column. The problem is  
that "8" is fixed.

Gabriel Genellina

More information about the Python-list mailing list