
June 8, 2018
2:58 p.m.
Given that an exhaust method for generators didn't make it, I dont think a keyword has more chance. For reference, that exhaust method would have looked like: (print (x) for x in range(50)).exhaust() and be defined as: def exhaust(self): for _ in self: pass Also, there was some more involved method that did it in less characters, having to do with queues of length 0 or something.