/third_party/python/Lib/test/ |
H A D | test_file.py | 45 # verify readinto 50 n = self.f.readinto(a) 54 # verify readinto refuses text files 58 if hasattr(self.f, "readinto"): 59 self.assertRaises(TypeError, self.f.readinto, a) 93 if hasattr(f, "readinto"): 94 self.assertRaises((OSError, TypeError), f.readinto, "") 264 ("readinto", (array("b", b" "*100),))] 301 f.readinto(buf) 303 self.fail("readinto() afte [all...] |
H A D | test_fileio.py | 82 # verify readinto 89 n = f.readinto(ba) 99 n = f.readinto(m) 105 n = f.readinto(m) 115 n = f.readinto(a) 121 n = f.readinto(a) 127 n = f.readinto(a) 201 self.assertRaises(TypeError, f.readinto, "") 219 self.assertRaises(TypeError, self.f.readinto) 220 self.assertRaises(ValueError, self.f.readinto, bytearra [all...] |
H A D | test_httplib.py | 736 n = resp.readinto(b) 740 n = resp.readinto(b) 767 n = resp.readinto(b) 799 n = resp.readinto(b) 803 n = resp.readinto(b) 806 n = resp.readinto(b) 831 n = resp.readinto(b) 835 n = resp.readinto(b) 838 n = resp.readinto(b) 904 if resp.readinto( 1794 def readinto(buffer): global() function [all...] |
H A D | test_memoryio.py | 476 self.assertEqual(memio.readinto(b), 5) 478 self.assertEqual(memio.readinto(b), 5) 480 self.assertEqual(memio.readinto(b), 0) 484 self.assertEqual(memio.readinto(b), 10) 488 self.assertEqual(memio.readinto(b), 0) 490 self.assertRaises(TypeError, memio.readinto, '') 494 memio.readinto(a) 497 self.assertRaises(ValueError, memio.readinto, b) 501 memio.readinto(b)
|
H A D | test_io.py | 86 RawIO.read() which calls readinto().""" 116 def readinto(self, buf): member in MockRawIOWithoutRead 177 def readinto(self, buf): member in MisbehavedRawIO 178 super().readinto(buf) 230 def readinto(self, b): member in MockFileIO 231 res = super().readinto(b) 353 self.assertEqual(f.readinto(data), 5) 356 self.assertEqual(f.readinto(data), 2) 362 self.assertEqual(f.readinto(byteslike(b"x")), 0) 366 self.assertEqual(f.readinto(byteslik [all...] |
H A D | test_marshal.py | 335 def readinto(self, buf): member in BugsTestCase.test_bad_reader.BadReader 336 n = super().readinto(buf)
|
H A D | test_bz2.py | 77 test_size += fh.readinto(memoryview(BIG_TEXT)[test_size:]) 195 self.assertEqual(bz2f.readinto(b), n) 199 self.assertEqual(bz2f.readinto(b), n)
|
H A D | test_memoryview.py | 312 self.assertRaises(TypeError, i.readinto, m)
|
/third_party/python/Lib/ |
H A D | bz2.py | 178 def readinto(self, b): member in BZ2File 184 return self._buffer.readinto(b)
|
H A D | _pyio.py | 627 # The read() method is implemented by calling readinto(); derived 629 # readinto() as a primitive operation. In general, readinto() can be 633 # readinto() in terms of read(), in case the latter is a more suitable 648 n = self.readinto(b) 668 def readinto(self, b): member in RawIOBase 674 self._unsupported("readinto") 695 implementation that defers to readinto(). 697 In addition, read(), readinto() and write() may raise 732 def readinto(sel member in BufferedIOBase 1379 def readinto(self, b): global() member in BufferedRWPair 1466 def readinto(self, b): global() member in BufferedRandom 1704 def readinto(self, b): global() member in FileIO [all...] |
H A D | _compression.py | 66 def readinto(self, b): member in DecompressReader
|
H A D | hashlib.py | 280 # Only binary files implement readinto(). 282 hasattr(fileobj, "readinto") 295 size = fileobj.readinto(buf)
|
H A D | tempfile.py | 808 def readinto(self, b): member in SpooledTemporaryFile 809 return self._file.readinto(b)
|
H A D | pickle.py | 270 def readinto(self, buf): member in _Unframer 272 n = self.current_frame.readinto(buf) 1199 self.readinto = self._unframer.readinto 1392 self.readinto(b)
|
H A D | socket.py | 692 def readinto(self, b): member in SocketIO
|
H A D | shutil.py | 171 """readinto()/memoryview() based variant of copyfileobj(). 172 *fsrc* must support readinto() method and both files must be 176 fsrc_readinto = fsrc.readinto
|
/third_party/python/Modules/_io/ |
H A D | winconsoleio.c | 630 readinto(winconsoleio *self, char *buf, Py_ssize_t len) in readinto() function 726 _io._WindowsConsoleIO.readinto 730 Same as RawIOBase.readinto(). 737 Py_ssize_t len = readinto(self, buffer->buf, buffer->len); in _io__WindowsConsoleIO_readinto_impl() 924 bytes_size = readinto(self, PyBytes_AS_STRING(bytes), PyBytes_GET_SIZE(bytes)); in _io__WindowsConsoleIO_read_impl()
|
H A D | iobase.c | 43 "Even though IOBase does not declare read, readinto, or write because\n" 51 "In some cases (such as readinto), a writable object is required. Text\n" 889 * The read() method is implemented by calling readinto(); derived classes 890 * that want to support read() only need to implement readinto() as a 891 * primitive operation. In general, readinto() can be more efficient than 894 * (It would be tempting to also provide an implementation of readinto() in 922 res = PyObject_CallMethodObjArgs(self, &_Py_ID(readinto), b, NULL); in _io__RawIOBase_read_impl() 1018 {"readinto", rawiobase_readinto, METH_VARARGS},
|
H A D | bufferedio.c | 36 "implementation that defers to readinto().\n" 38 "In addition, read(), readinto() and write() may raise\n" 83 _io._BufferedIOBase.readinto 953 CHECK_CLOSED(self, "readinto of closed file") in _buffered_readinto_generic() 1030 _io._Buffered.readinto 1460 res = PyObject_CallMethodOneArg(self->raw, &_Py_ID(readinto), memobj); in _bufferedreader_raw_read() 1476 "raw readinto() failed" in _bufferedreader_raw_read() 1483 "raw readinto() returned invalid length %zd " in _bufferedreader_raw_read() 2184 return _forward_call(self->reader, &_Py_ID(readinto), args); 2558 {"readinto", (PyCFunctio [all...] |
/third_party/python/Lib/http/ |
H A D | client.py | 490 def readinto(self, b): member in HTTPResponse 513 n = self.fp.readinto(b) 639 n = self.fp.readinto(b)
|
/third_party/python/Modules/ |
H A D | _pickle.c | 690 PyObject *readinto; /* readinto() method of the input stream. */ member 1395 if (!self->readinto) { in _Unpickler_ReadInto() 1396 /* readinto() not supported on file-like object, fall back to read() in _Unpickler_ReadInto() 1423 /* Call readinto() into user buffer */ in _Unpickler_ReadInto() 1428 PyObject *read_size_obj = _Pickle_FastCall(self->readinto, buf_obj); in _Unpickler_ReadInto() 1438 "readinto() returned negative size"); in _Unpickler_ReadInto() 1615 self->readinto = NULL; in _Unpickler_New() 1650 if (_PyObject_LookupAttr(file, &_Py_ID(readinto), &self->readinto) < in _Unpickler_SetInputStream() [all...] |
/third_party/python/Include/internal/ |
H A D | pycore_global_strings.h | 325 STRUCT_FOR_ID(readinto)
|
H A D | pycore_runtime_init.h | 948 INIT_ID(readinto), \
|
/third_party/python/Lib/multiprocessing/ |
H A D | connection.py | 241 result.readinto(m[offset // itemsize :
|
/third_party/python/Lib/asyncio/ |
H A D | base_events.py | 912 read = await self.run_in_executor(None, file.readinto, view) 1217 read = await self.run_in_executor(None, file.readinto, view)
|