I doubt that. A few days ago I've run pylint and it reported some complains
about non necessary else after break, or after return. My first reaction
was just like yours, but then I looked more closely and those complains
were correct.
while True:
... # some code here
if condition:
break
else:
do_something_else_here()
# or
def f():
# some code ...
if condition:
return result_a
else:
do_other_thing()
# ...
return result_b
In both cases, meaning of the program is the same as if the else block was
unindented and else removed.
Vitalije
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/74c88487-6eb9-40a7-a38d-41b12714e770%40googlegroups.com.