79750688

Date: 2025-08-29 19:00:39
Score: 2.5
Natty:
Report link

Wouldn't something like this work? Just check for empty strings?

def read_loop():
    while True:
        chunk = r_stream.readline()
        if not chunk: # Empty string = pipe closed
            break
        if chunk:
            print('got chunk', repr(chunk))
            got_chunks.append(chunk)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (0.5):
Posted by: 0ro2