What does the first line from `pydoc try` actually mean? This does not look like the syntax that one is supposed to use.

try_stmt  ::= try1_stmt | try2_stmt

I can write simple statements as shown below, but I want to actually understand what I am doing.



try:
    import io
    print("importing io")
except ImportError:
    print("nothing to import")
    foo = None
try:
    import somefunctionthatdoesnotexist
    print("importing ...")
except ImportError:
    print("nothing to import")
    foo = None

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to