[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: folding non java/cpp code
From:       Gordon Tyler <gordon () doxxx ! net>
Date:       2002-12-06 18:22:30
[Download RAW message or body]

Joseph Wenninger wrote:
> I have never done anything in pyhton. Are
> <SPC><SPC><SPC>,<SPC><SPC><TAB>,<SPC><TAB><TAB>,<TAB><TAB><TAB> equal or
> are they handled as different indentations or are the equal ?

 From the Python Language Reference:

***
Leading whitespace (spaces and tabs) at the beginning of a logical line 
is used to compute the indentation level of the line, which in turn is 
used to determine the grouping of statements.

First, tabs are replaced (from left to right) by one to eight spaces 
such that the total number of characters up to and including the 
replacement is a multiple of eight (this is intended to be the same rule 
as used by Unix). The total number of spaces preceding the first 
non-blank character then determines the line's indentation. Indentation 
cannot be split over multiple physical lines using backslashes; the 
whitespace up to the first backslash determines the indentation.

Cross-platform compatibility note: because of the nature of text editors 
on non-UNIX platforms, it is unwise to use a mixture of spaces and tabs 
for the indentation in a single source file.
***

So, the answer to your question would be that all three of those 
examples are different indentations.

Ciao,
Gordon

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic