GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [Python-Dev] Fwd: try...else
  • [Python-Dev] Fwd: try...else
  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] Fwd: try...else

[Python-Dev] Fwd: try...else

Michael Hudson [email protected]
Thu, 28 Dec 2000 18:27:48 +0000 (GMT)

  • Previous message: [Python-Dev] Fwd: try...else
  • Next message: [Python-Dev] Fwd: try...else
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

On Thu, 28 Dec 2000, M.-A. Lemburg wrote:

> I think Robin mixed up try...finally with try...except...else.

I think so too.

> The finally clause is executed even in case an exception occurred.
> 
> He does have a point however that 'return' will bypass 
> try...else and try...finally clauses. I don't think we can change
> that behaviour, though, as it would break code.

return does not skip finally clauses[1].  In my not especially humble
opinion, the current behaviour is the Right Thing.  I'd have to think for
a moment before saying what Robin's example would print, but I think the
alternative would disturb me far more.

Cheers,
M.

[1] In fact the flow of control on return is very similar to that of an
    exception - ooh, look at that implementation...




  • Previous message: [Python-Dev] Fwd: try...else
  • Next message: [Python-Dev] Fwd: try...else
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.