@@ -325,10 +325,10 @@ read_bytes(bytesio *self, Py_ssize_t size)
325325}
326326
327327PyDoc_STRVAR (read_doc ,
328- "read([size]) -> read at most size bytes, returned as a string .\n"
328+ "read([size]) -> read at most size bytes, returned as a bytes object .\n"
329329"\n"
330330"If the size argument is negative, read until EOF is reached.\n"
331- "Return an empty string at EOF." );
331+ "Return an empty bytes object at EOF." );
332332
333333static PyObject *
334334bytesio_read (bytesio * self , PyObject * args )
@@ -369,10 +369,10 @@ bytesio_read(bytesio *self, PyObject *args)
369369
370370
371371PyDoc_STRVAR (read1_doc ,
372- "read1(size) -> read at most size bytes, returned as a string .\n"
372+ "read1(size) -> read at most size bytes, returned as a bytes object .\n"
373373"\n"
374374"If the size argument is negative or omitted, read until EOF is reached.\n"
375- "Return an empty string at EOF." );
375+ "Return an empty bytes object at EOF." );
376376
377377static PyObject *
378378bytesio_read1 (bytesio * self , PyObject * n )
@@ -388,11 +388,11 @@ bytesio_read1(bytesio *self, PyObject *n)
388388}
389389
390390PyDoc_STRVAR (readline_doc ,
391- "readline([size]) -> next line from the file, as a string .\n"
391+ "readline([size]) -> next line from the file, as a bytes object .\n"
392392"\n"
393393"Retain newline. A non-negative size argument limits the maximum\n"
394394"number of bytes to return (an incomplete line may be returned then).\n"
395- "Return an empty string at EOF.\n" );
395+ "Return an empty bytes object at EOF.\n" );
396396
397397static PyObject *
398398bytesio_readline (bytesio * self , PyObject * args )
@@ -672,11 +672,11 @@ bytesio_write(bytesio *self, PyObject *obj)
672672}
673673
674674PyDoc_STRVAR (writelines_doc ,
675- "writelines(sequence_of_strings ) -> None. Write strings to the file.\n"
675+ "writelines(lines ) -> None. Write bytes objects to the file.\n"
676676"\n"
677- "Note that newlines are not added. The sequence can be any iterable\n"
678- "object producing strings . This is equivalent to calling write() for\n"
679- "each string ." );
677+ "Note that newlines are not added. The argument can be any iterable\n"
678+ "object producing bytes objects . This is equivalent to calling write() for\n"
679+ "each bytes object ." );
680680
681681static PyObject *
682682bytesio_writelines (bytesio * self , PyObject * v )
0 commit comments