Python Forum
Checking my basic understanding of coding
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking my basic understanding of coding
#4
Line 48 doesn't break the loop, it's calling sys.exit() to end the program immediately. https://docs.python.org/3/library/sys.html#sys.exit

Personally, I think this function should be used very very rarely, if ever. I think of it as a big red flag that something extremely bad happened, and you don't know how to proceed. Libraries should never use it, only client code (imagine if your webbrowser just crashed for some minor issue).
Reply


Messages In This Thread
RE: Checking my basic understanding of coding - by nilamo - Jan-07-2019, 04:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  I need help on a basic coding question Presssure 1 4,195 May-23-2018, 05:12 AM
Last Post: micseydel
  Basic Coding Slays College Girl AnjyilLee 5 4,754 Sep-15-2017, 01:19 AM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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