Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
resetting a generator
#5
what i am wanting is for there to be some extra callable that causes the generator to reset during its iteration, much like your output example shows. my concern is how to communicate the "event" of calling that reset function to the generator so i can modify its state. if thinking so extra class it checks at each iteration for a flag that tells it to reset and another method to raise the flag. but how to do that with multiple instances of the generator, chains and so forth.
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
resetting a generator - by Skaperen - Nov-09-2019, 06:07 AM
RE: resetting a generator - by Gribouillis - Nov-10-2019, 04:21 PM
RE: resetting a generator - by Skaperen - Nov-10-2019, 08:36 PM
RE: resetting a generator - by Gribouillis - Nov-10-2019, 08:50 PM
RE: resetting a generator - by Skaperen - Nov-12-2019, 09:44 PM
RE: resetting a generator - by Gribouillis - Nov-12-2019, 10:37 PM
RE: resetting a generator - by Skaperen - Nov-13-2019, 04:44 AM
RE: resetting a generator - by Gribouillis - Nov-13-2019, 06:13 AM
RE: resetting a generator - by Skaperen - Nov-14-2019, 04:09 AM

Forum Jump:

User Panel Messages

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