try/except/finally construct not available?
Christopher Baus
christopher at baus.net
Mon Jun 28 15:59:51 EDT 2004
More information about the Python-list mailing list
Mon Jun 28 15:59:51 EDT 2004
- Previous message (by thread): Class Chaos
- Next message (by thread): try/except/finally construct not available?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I'm just learning python after years of C/C++/Java/bash/etc. It is going
pretty good except a few minor issues regarding syntax. I have to admit
the while/else contruct is a bit weird, but I think I understand the
motivation. But I am confused about exceptions having read the chapter in
Learning Python.
How do I do something similar to the following java code?
try{
a.mightThrow();
}
catch(Exception e){
System.out.print("looks like an exception");
}
finally{
a.cleanup();
}
try:
pass
finally:
pass
Doesn't allow the programmer to catch certain exceptions, handle them, and
then perform operations in either case.
--
Christopher Baus
http://www.baus.net/
Tahoe, Wine, and Linux.
- Previous message (by thread): Class Chaos
- Next message (by thread): try/except/finally construct not available?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list