Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
one time loop
#9
there are 3 phases. the first is to check the arguments for types and errors and convert the various types to a common form (a list or tuple of ints), in a few cases it does a recursive call to itself and returns instead of going on to phase 2. the one-time loop only applies to phase 1. phase 3 takes that common form and returns the data to the caller in a form much like what it was called with. there are 4 of these, each for different kinds of data conversion. but i can't just make a simple common pattern since the data setup does vary somewhat with the type of conversion being done. these conversions are unicode to utf8, utf8 to unicode (because what python3 has is too limited), and encode+decode of variant escape sequences (a lot more than what python provides). there are somother data conversions i'm considering.

yes, there really are other ways to organize this. but maintaining a single direction of flow and avoiding extreme nesting depth helps people see what is going on. the way i am doing it meets my goal.
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
one time loop - by Skaperen - Jul-25-2018, 03:39 PM
RE: one time loop - by Larz60+ - Jul-25-2018, 05:18 PM
RE: one time loop - by Skaperen - Jul-25-2018, 09:14 PM
RE: one time loop - by DeaD_EyE - Jul-26-2018, 01:29 AM
RE: one time loop - by Skaperen - Jul-26-2018, 03:45 AM
RE: one time loop - by Larz60+ - Jul-25-2018, 09:24 PM
RE: one time loop - by Skaperen - Jul-26-2018, 12:53 AM
RE: one time loop - by stranac - Jul-26-2018, 07:09 AM
RE: one time loop - by Skaperen - Jul-26-2018, 02:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to measure execution time of a multithread loop spacedog 2 2,917 Apr-24-2021, 07:52 AM
Last Post: spacedog
  Updating a matrix in a time interval inside a for loop vp1989 4 2,934 May-17-2020, 07:15 PM
Last Post: vp1989
  Loop independent of excecution time of a script Forelli 8 3,868 Feb-02-2020, 10:49 PM
Last Post: snippsat
  How to Display Multiple Time Tables With While Loop ZQ12 2 2,197 Nov-10-2019, 04:15 AM
Last Post: ZQ12
  Time execution of a "for loop" with zip different in 2 equivalent context sebastien 1 1,939 Oct-11-2019, 11:07 AM
Last Post: sebastien
  output list reducing each time through loop 3Pinter 6 3,560 Mar-19-2019, 01:31 PM
Last Post: perfringo
  Display 20 records at a time,data structure or loop pythonds 1 2,496 Mar-29-2018, 11:09 AM
Last Post: DeaD_EyE
  best pythonic one-time loop Skaperen 2 2,798 Feb-26-2018, 04:02 AM
Last Post: Skaperen
  For Loop, execute one time for every loop iteration dragan979 2 4,461 Feb-20-2018, 12:02 PM
Last Post: dragan979
  Code issue with time remaining loop. Python3 deboerdn2000 11 8,901 May-04-2017, 04:53 PM
Last Post: deboerdn2000

Forum Jump:

User Panel Messages

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