Function editing with Vim throws IndentError

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Jul 26 19:44:44 EDT 2008


In message
<24a548ad-4cb3-410c-89df-21da6ef4220f at j7g2000prm.googlegroups.com>, Matimus
wrote:

> On Jul 24, 9:32 pm, Lawrence D'Oliveiro <l... at geek-
> central.gen.new_zealand> wrote:
>
>> In message
>> <e23f51c1-7160-4aba-bea0-d624ec9a1... at w1g2000prk.googlegroups.com>,
>> Matimus wrote:
>>
>> > On Jul 24, 2:54 am, Lawrence D'Oliveiro <l... at geek-
>> > central.gen.new_zealand> wrote:
>> >> In message
>> >> <f558e635-aa40-4d54-bd1a-45e8463cd... at v26g2000prm.googlegroups.com>,
>>
>> >> Matimus wrote:
>> >> > That isn't the standard. With that setup tabs will show up as 4
>> >> > spaces, and still confuse you.
>>
>> >> Why should that be confusing? The most common tab-stop setting is 4
>> >> columns.
>>
>> > A tab character is specified as 8 spaces.
>>
>> Specified by whom? The most common setting these days is 4 columns.
> 
> All argument about specification aside, Python interprets a tab
> character as equivalent to 8 spaces. If you are treating tabs as
> equivalent to 4 spaces in your python code it will cause
> IndentationError exceptions to be raised.

I have Emacs configured to show tabs as 4 columns wide, and I've never had
such an exception happen in my Python code as a result.



More information about the Python-list mailing list