Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
which is "better"?
#6
my bad typing the code into the forum. i left out the () (as dead_eye first noticed). i do make that typo error many times when coding.

(Mar-31-2018, 06:26 PM)Budsy Wrote: The version with all the returns is clear enough here, but in general it is considered bad practice in structured programming to have a method return from any more than one location in the routine.

i've never heard that one (that methods should return from one place) in my many years of C coding (since 1982). i can see how that would have encouraged the use of goto (C does have goto but i only used it it do dropout cleanups after errors).
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
which is "better"? - by Skaperen - Mar-31-2018, 12:34 AM
RE: which is "better"? - by DeaD_EyE - Mar-31-2018, 10:36 AM
RE: which is "better"? - by wavic - Mar-31-2018, 02:26 PM
RE: which is "better"? - by Budsy - Mar-31-2018, 06:26 PM
RE: which is "better"? - by Gribouillis - Apr-01-2018, 07:08 AM
RE: which is "better"? - by Skaperen - Apr-02-2018, 04:29 AM
RE: which is "better"? - by ljmetzger - Apr-02-2018, 09:45 AM
RE: which is "better"? - by Gribouillis - Apr-02-2018, 10:10 AM
RE: which is "better"? - by Skaperen - Apr-03-2018, 02:47 AM

Forum Jump:

User Panel Messages

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