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. _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/