common mistakes in this simple program

Marko Rauhamaa marko at
Mon Feb 29 15:29:54 EST 2016

sohcahtoa82 at

> Every time you say "try-expect", my head wants to explode.
> It is called a "try-except" block, because you're using the key words
> "try" and "except" when you make one.

Ah, I remember a Python-based test system idea where the "except"
keyword meant "expect":

    try: event()
    except user.CloseRequest():
    except user.SendRequest():
    except peer.DataIndication():
    except Timeout():


In the end, though, we came up with something better.


More information about the Python-list mailing list