MCPcopy Index your code
hub / github.com/python/cpython / isclosed

Method isclosed

Lib/http/client.py:461–469  ·  view source on GitHub ↗

True if the connection is closed.

(self)

Source from the content-addressed store, hash-verified

459 # End of "raw stream" methods
460
461 def isclosed(self):
462 """True if the connection is closed."""
463 # NOTE: it is possible that we will not ever call self.close(). This
464 # case occurs when will_close is TRUE, length is None, and we
465 # read up to the last byte, but NOT past it.
466 #
467 # IMPLIES: if will_close is FALSE, then self.close() will ALWAYS be
468 # called, meaning self.isclosed() is meaningful.
469 return self.fp is None
470
471 def read(self, amt=None):
472 """Read and return the response body, or up to the next amt bytes."""

Calls

no outgoing calls