Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
generator runout
#3
(Oct-31-2019, 01:24 AM)Skaperen Wrote: this can get annoying

I wouldn't call it 'annoying' i would call it 'silent'. There is no error raised when using exhausted iterator or generator only strange behavior and missing values.

There are many ways to mitigate this situation. One of them is to define function which returns new generator/iterator every time called.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
generator runout - by Skaperen - Oct-31-2019, 01:24 AM
RE: generator runout - by buran - Oct-31-2019, 07:05 AM
RE: generator runout - by perfringo - Oct-31-2019, 07:09 AM
RE: generator runout - by Skaperen - Oct-31-2019, 08:11 AM
RE: generator runout - by buran - Oct-31-2019, 08:36 AM
RE: generator runout - by Skaperen - Nov-01-2019, 01:01 AM
RE: generator runout - by DeaD_EyE - Oct-31-2019, 09:24 AM

Forum Jump:

User Panel Messages

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