replacing `else` with `then` in `for` and `try`

Alexey Muranov alexey.muranov at gmail.com
Thu Nov 2 04:05:36 EDT 2017


On Wed, 2017-11-01 at 21:30 +0000, Stefan Ram wrote:
> >
> >   In languages like Algol 68, »then« is used for a clause
> >   that is to be executed when the main condition of an
> >   if-statement /is/ true, so this might cause some confusion.
> >

sure, and `else` is used for a clause that is to be executed when the 
main condition of `if` is false.

So, in

    try:
        do_something
    except:
        catch_exception
    else:
        continue_doing_something

when no exception occurs in `do_something`, is `do_something` more 
true, or more false?

Alexey.




More information about the Python-list mailing list