Parsing Indented Text (like parsing Python)

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sun Mar 11 13:12:06 EDT 2007


En Sun, 11 Mar 2007 13:12:20 -0300, Paul McGuire <ptmcg at austin.rr.com>  
escribió:

> On Mar 11, 8:37 am, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> 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