newbie: stani's python editor if-else

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Tue Sep 11 03:45:15 EDT 2007


madzientist a écrit :
> hi,

> two quick questions:
> 
> a) i am using SPE (latest version) and for some reason, when i type,
> say
> 
> if 1==2:
>     print "not equal"
>     else:
>           print "equal"
> 
> the else is at the same indentation level as the preceding print
> statement, and i get a syntax error

Obviously. As you know, in Python, indentation is signifiant.

> why doesn't spe automatically put the else at the level of the if
> statement ? 

I don't know. Perhaps you should ask the author ?

> what am i dong wrong ?

Mmm, let's see.... Posting on the wrong place, perhaps ?-)

> once i manually change the
> indentation, the code snippet runs perfectly.

Indeed.

> b) if this is not the group for such elementary questions, please do
> let me know.

Ok, since you ask for it : this is not the group for problems related to 
SPE.

You probably want the SPE mailing-list (if it exists), or whatever the 
project page offers as a mean of sending feedback to the author.

Python-related questions, even elementary ones (provided you at least 
took time to read the official tutorial), are of course welcome !-)

HTH



More information about the Python-list mailing list