indetation problem

Ken Seehof kens at sightreader.com
Thu Jul 26 16:25:21 EDT 2001


Me:  Doctor, my vision gets blurry whenever I stick my head in the
        microwave and turn it on.

Doctor:  <states the obvious>

But to answer your question, a tab is always equal to 8 spaces, and
as far as I know it's always been that way.  The idea that a tab has
anything to do with 8 spaces is rather archaic, and really IMHO the
<INIT_FLAME_WAR> tab character should not be allowed as
indentation at all </INIT_FLAME_WAR>, but I don't care enough
to argue about it much any more.

- Ken Seehof

----- Original Message ----- 
From: "Fuming Wang" <fumingw at yahoo.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Thursday, July 26, 2001 11:09 AM
Subject: indetation problem


> I am experiencing indentation problems when mixing tabs and spaces in
> my code. They appear in correct indentation in my editor, but cause
> error when running them. I am using Python 2.2a1. I reproduced the
> problem in following interactive sequence:
> 
> >>> def dummy():
> ... <  tab >a = 1
> ... <sp><sp>b = 2
>   File "<stdin>", Line 3
> 
> IndentationError: unindent does not match any outer indentation level.
> 
> Question: is this something new, or it has always been there. It is
> strange that I have been using Python for several years, but only
> notice this behavior recently.
> 
> Thanks,
> 
> Fuming Wang
> -- 
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list