Python Forum
best way out of nested loops?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
best way out of nested loops?
#8
i like the function idea. but that has the context problem where you might need to pass lots of data. that is where refactoring is needed. i think raising an exception is a kludge. exceptions have a purpose and this is not it. still, it can be a quick way to get at this kind of issue when the cost (such as time) of refactoring is too high.
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
best way out of nested loops? - by Skaperen - May-27-2020, 01:46 AM
RE: best way out of nested loops? - by Knight18 - May-27-2020, 07:21 AM
RE: best way out of nested loops? - by buran - May-27-2020, 12:43 PM
RE: best way out of nested loops? - by buran - May-27-2020, 12:44 PM
RE: best way out of nested loops? - by jefsummers - May-27-2020, 02:54 PM
RE: best way out of nested loops? - by DeaD_EyE - May-27-2020, 04:03 PM
RE: best way out of nested loops? - by deanhystad - May-28-2020, 04:52 AM
RE: best way out of nested loops? - by Skaperen - May-30-2020, 05:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  reduce nested for-loops Phaze90 11 1,908 Mar-16-2023, 06:28 PM
Last Post: ndc85430
  Nested for loops: Iterating over columns of a DataFrame to plot on subplots dm222 0 1,724 Aug-19-2022, 11:07 AM
Last Post: dm222
  Nested for loops - help with iterating a variable outside of the main loop dm222 4 1,598 Aug-17-2022, 10:17 PM
Last Post: deanhystad
  breaking out of nested loops Skaperen 3 1,226 Jul-18-2022, 12:59 AM
Last Post: Skaperen
  Break out of nested loops muzikman 11 3,356 Sep-18-2021, 12:59 PM
Last Post: muzikman
  How to break out of nested loops pace 11 5,380 Mar-03-2021, 06:25 PM
Last Post: pace
  Nested for Loops sammay 1 8,728 Jan-09-2021, 06:48 PM
Last Post: deanhystad
  How to make this function general to create binary numbers? (many nested for loops) dospina 4 4,423 Jun-24-2020, 04:05 AM
Last Post: deanhystad
  Python beginner - nested while loops mikebarden 1 1,874 Jun-01-2020, 01:04 PM
Last Post: DPaul
  alternative to nested loops for large data set JonnyEnglish 2 2,579 Feb-19-2020, 11:26 PM
Last Post: JonnyEnglish

Forum Jump:

User Panel Messages

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