if..else stmt
J. Cliff Dyer
jcd at sdf.lonestar.org
Mon Oct 22 06:54:38 EDT 2007
More information about the Python-list mailing list
Mon Oct 22 06:54:38 EDT 2007
- Previous message (by thread): how to get the clsid of Internet Explorer_Server?
- Next message (by thread): if..else stmt
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
bigden007 wrote: > Hi, > I have a if..else statement in my script. The statements all execute > fine, but the problem is , even if the IF part of the statement is > true, the else part executes as well. The verion of pythin i use 2.5 > Any help is appreciatiated. > > Regards > > Big Den. > > Your else statement is incorrectly indented. The interpreter treats it as part of the for-loop construct inside the if statement rather than as part of the if statement itself. See the recent thread about for-else constructs for more details. If your problem is not obvious yet, make sure you aren't mixing spaces and tabs. :)
- Previous message (by thread): how to get the clsid of Internet Explorer_Server?
- Next message (by thread): if..else stmt
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list