MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / receive

Method receive

example_code/item_076.py:64–68  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

62 self.connection.send(data)
63
64 def receive(self):
65 line = self.file.readline()
66 if not line:
67 raise EOFError("Connection closed")
68 return line[:-1].decode()
69
70
71print("Example 2")

Callers 4

loopMethod · 0.45
request_numberMethod · 0.45
loopMethod · 0.45
request_numberMethod · 0.45

Calls 1

EOFErrorClass · 0.85

Tested by

no test coverage detected