Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
finally clause
#5
so if the exception might happen, finally: assures that you can close/teardown while not actually handling the exception, or doing continue/return/break in except:. unless using continue/return/break i see following code as equivalent. but have been assuming their would always be an except:. now i understand there might not be, and there are 4 ways to change flow, the 3 statements continue, return, break, and the lack of except: (exception causing the flow change). yet another reason to be happy there is no goto.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
finally clause - by Skaperen - Jun-02-2019, 04:37 AM
RE: finally clause - by perfringo - Jun-02-2019, 05:10 AM
RE: finally clause - by heiner55 - Jun-02-2019, 06:39 AM
RE: finally clause - by Yoriz - Jun-02-2019, 07:01 AM
RE: finally clause - by Skaperen - Jun-02-2019, 08:34 PM
RE: finally clause - by perfringo - Jun-02-2019, 08:45 PM
RE: finally clause - by snippsat - Jun-02-2019, 09:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to use the LIKE clause in Python Columbo 9 1,732 Oct-09-2022, 10:22 PM
Last Post: Larz60+
  SQL Query is not executing WHERE clause hammer 7 2,449 Nov-15-2021, 01:44 PM
Last Post: hammer
  How does this if clause work? Pedroski55 3 2,351 Jun-10-2021, 06:31 AM
Last Post: Gribouillis
  Help with try, except, else finally Pytho13 14 5,243 Mar-23-2021, 05:35 PM
Last Post: snippsat
  Am I a retard - else and finally blocks in a try statement RubenF85 6 2,695 Jan-12-2021, 05:56 PM
Last Post: bowlofred
  can i raise an exception in a try clause? Skaperen 14 5,918 Dec-19-2019, 12:29 AM
Last Post: Skaperen
  pass captured value from input() to where clause metro17 5 3,356 Sep-09-2019, 05:24 AM
Last Post: metro17
  try, except, finally ? microphone_head 3 2,910 Apr-28-2019, 09:36 PM
Last Post: microphone_head
  if clause fails DeadCthulhuWaitsDreaming 10 4,893 Apr-07-2019, 09:19 PM
Last Post: DeadCthulhuWaitsDreaming
  how to code in Python "where" clause of SAS FelixS 2 2,861 Mar-26-2019, 04:59 PM
Last Post: FelixS

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020