bigden007 a écrit :
> 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.
My crystal ball tells me the pr
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.
>
>
You
tements 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.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
--
View this message in context:
http://www.nabble.com/if..else-stmt-tf4670106.html#a13340589
Sent from the Python - python-list mailing list archive at Nabble.com.
--
http://mail.python.org/mailman/listinfo/python-list
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 are
bigden007 wrote:
> 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.
You're doing something wrong. Without
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.
--
http://mail.python.org/mailman/listinf