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

Method detach

Lib/socket.py:522–530  ·  view source on GitHub ↗

detach() -> file descriptor Close the socket object without closing the underlying file descriptor. The object cannot be used after this call, but the file descriptor can be reused for other purposes. The file descriptor is returned.

(self)

Source from the content-addressed store, hash-verified

520 self._real_close()
521
522 def detach(self):
523 """detach() -> file descriptor
524
525 Close the socket object without closing the underlying file descriptor.
526 The object cannot be used after this call, but the file descriptor
527 can be reused for other purposes. The file descriptor is returned.
528 """
529 self._closed = True
530 return super().detach()
531
532 @property
533 def family(self):

Callers 2

_createMethod · 0.45
socketpairFunction · 0.45

Calls 1

superClass · 0.85

Tested by

no test coverage detected