Skip to main content
7 events
when toggle format what by license comment
Mar 30, 2020 at 19:22 comment added pastaleg @juanpa.arrivillaga heavy handed indication of intent. If I try to use that variable later I will get better error message .
Mar 30, 2020 at 18:37 comment added pastaleg Hey @JesujobaALABI, I updated the answer to suggest a conversion to a list.
Mar 30, 2020 at 18:35 history edited pastaleg CC BY-SA 4.0
new solution based on input from OP
Mar 30, 2020 at 18:04 comment added Jesujoba Oluwadara ALABI Hi @chepner and @pastaleg, I don't have access to iter and fruit directly due to abstraction, I can only call a function to return iter, then use the iterator.
Mar 30, 2020 at 17:18 comment added pastaleg definitely, and since OP has control over printIter() it is probably best to scrap the idea of iterators
Mar 30, 2020 at 17:15 comment added chepner There's no point in calling iter between calls to printIter; you can simply pass fruit directly.
Mar 30, 2020 at 17:04 history answered pastaleg CC BY-SA 4.0