Try block problem

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Tue Nov 20 13:53:57 CET 2001


Tue, 20 Nov 2001 05:37:41 -0600, Skip Montanaro <skip at pobox.com> pisze:

> The thing that is perhaps slightly misleading is the use of the "try"
> keyword to begin both constructs.  There's really no "try" connotation to
> try/finally.

Maybe it's because try:except: would have to be used to simulate
try:finally: if it wasn't available natively.

In other words try:finally: is one of things which do something
non-trivial with exceptions instead of silently propagating them up.

In Haskell the equivalent of try:finally: is called bracket
(it includes initialization).

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^
QRCZAK



More information about the Python-list mailing list