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

Class File

Lib/test/test_socket.py:2096–2101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2094 @unittest.skipUnless(hasattr(os, 'sendfile'), 'test needs os.sendfile()')
2095 def test__sendfile_use_sendfile(self):
2096 class File:
2097 def __init__(self, fd):
2098 self.fd = fd
2099
2100 def fileno(self):
2101 return self.fd
2102 with socket.socket() as sock:
2103 fd = os.open(os.curdir, os.O_RDONLY)
2104 os.close(fd)

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…