Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
parallel iterables
#3
in the mean time i wrote my own. it has an option pad= that allows specifying a pad for shorter iterables (if not specified then the shortest iterable stops the whole thing). i also has a last= option that allows specifying a final yield when all iterables are done. if it is given an int instead of a real iterable, it passes that int to range(that_int) and uses that. likewise if what is passed is literally a list or tuple of len() in (1,2,3) then those ints are passed as args to range() to become the iterable that is used. iow, cheap ways to do ranges.

since zip() did not match my project's need, i guess i didn't think about it when i coded my own variant (still in pre-alpha ... i haven't even coded a test for it, yet)
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
parallel iterables - by Skaperen - Nov-06-2021, 07:45 AM
RE: parallel iterables - by Gribouillis - Nov-06-2021, 09:23 AM
RE: parallel iterables - by Skaperen - Nov-07-2021, 08:17 PM
RE: parallel iterables - by Yoriz - Nov-07-2021, 08:27 PM
RE: parallel iterables - by Gribouillis - Nov-07-2021, 08:33 PM
RE: parallel iterables - by Skaperen - Nov-08-2021, 01:09 AM
RE: parallel iterables - by buran - Nov-08-2021, 06:00 AM
RE: parallel iterables - by Gribouillis - Nov-08-2021, 07:52 AM
RE: parallel iterables - by buran - Nov-08-2021, 08:23 AM
RE: parallel iterables - by Skaperen - Nov-08-2021, 09:09 PM

Forum Jump:

User Panel Messages

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