morfizm (morfizm) wrote,
morfizm
morfizm

Exception Handing

This time how Python works according to my intuition.
Trivial exercise: what does following code print?

try:
    try:
        raise Exception("Hello from second try!")
    finally:
        try:
            print "Finally"
            raise Exception("Hello from finally!")
        except:
            pass
    print "We're clean"
except Exception as e:
    print e.message
Tags: in english, software development
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 2 comments