News for hackers. Stuff that matters.
Re:What’s New in Python 3.8 by hchasestevens on Tuesday October 15, 2019 @07:22AM (#21257387)
Your second use case is actually already covered in Python, assuming you have some kind of sentinel value you can break on:

  for s in iter(network_service.read, ''):
      process(s)

There are no comments on this comment yet.