On Wednesday 08 January 2003 10:00, Andre Poenitz wrote:
> Currently nesting there is
>
> 1. level:  4 spaces
> 2. level:  1 tab
> 3. level:  1 tab + 4 spaces
>
> etc. which is a mess when tab != 8 spaces.
>
> Is this mandatory for python or can't we simply use the same rules as in
> the rest of LyX?

  For python the indentation only needs to be consistent locally, you could 
have different styles in different locations inside the same file.

Example:
def t(x):
 if x>0:
  return x
 else:
  return -x

def f(x):
        if x>0:
                return x*x
        else:
                return -x*x

This is valid although I have never seen such style (for obvious reasons ;-)).

  The cruel truth is that we use that style since it is emacs python mode 
default.
 
> Andre'

-- 
José Abílio

Reply via email to