Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
b817b77a
Commit
b817b77a
authored
Apr 10, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced "string" with "bytes object" in docstrings of binary I/O objects.
parent
89c057a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
Modules/_io/bytesio.c
Modules/_io/bytesio.c
+10
-10
Modules/_io/fileio.c
Modules/_io/fileio.c
+3
-3
No files found.
Modules/_io/bytesio.c
View file @
b817b77a
...
@@ -258,10 +258,10 @@ bytesio_tell(bytesio *self)
...
@@ -258,10 +258,10 @@ bytesio_tell(bytesio *self)
}
}
PyDoc_STRVAR
(
read_doc
,
PyDoc_STRVAR
(
read_doc
,
"read([size]) -> read at most size bytes, returned as a
string
.
\n
"
"read([size]) -> read at most size bytes, returned as a
bytes object
.
\n
"
"
\n
"
"
\n
"
"If the size argument is negative, read until EOF is reached.
\n
"
"If the size argument is negative, read until EOF is reached.
\n
"
"Return an empty
string
at EOF."
);
"Return an empty
bytes object
at EOF."
);
static
PyObject
*
static
PyObject
*
bytesio_read
(
bytesio
*
self
,
PyObject
*
args
)
bytesio_read
(
bytesio
*
self
,
PyObject
*
args
)
...
@@ -307,10 +307,10 @@ bytesio_read(bytesio *self, PyObject *args)
...
@@ -307,10 +307,10 @@ bytesio_read(bytesio *self, PyObject *args)
PyDoc_STRVAR
(
read1_doc
,
PyDoc_STRVAR
(
read1_doc
,
"read1(size) -> read at most size bytes, returned as a
string
.
\n
"
"read1(size) -> read at most size bytes, returned as a
bytes object
.
\n
"
"
\n
"
"
\n
"
"If the size argument is negative or omitted, read until EOF is reached.
\n
"
"If the size argument is negative or omitted, read until EOF is reached.
\n
"
"Return an empty
string
at EOF."
);
"Return an empty
bytes object
at EOF."
);
static
PyObject
*
static
PyObject
*
bytesio_read1
(
bytesio
*
self
,
PyObject
*
n
)
bytesio_read1
(
bytesio
*
self
,
PyObject
*
n
)
...
@@ -326,11 +326,11 @@ bytesio_read1(bytesio *self, PyObject *n)
...
@@ -326,11 +326,11 @@ bytesio_read1(bytesio *self, PyObject *n)
}
}
PyDoc_STRVAR
(
readline_doc
,
PyDoc_STRVAR
(
readline_doc
,
"readline([size]) -> next line from the file, as a
string
.
\n
"
"readline([size]) -> next line from the file, as a
bytes object
.
\n
"
"
\n
"
"
\n
"
"Retain newline. A non-negative size argument limits the maximum
\n
"
"Retain newline. A non-negative size argument limits the maximum
\n
"
"number of bytes to return (an incomplete line may be returned then).
\n
"
"number of bytes to return (an incomplete line may be returned then).
\n
"
"Return an empty
string
at EOF.
\n
"
);
"Return an empty
bytes object
at EOF.
\n
"
);
static
PyObject
*
static
PyObject
*
bytesio_readline
(
bytesio
*
self
,
PyObject
*
args
)
bytesio_readline
(
bytesio
*
self
,
PyObject
*
args
)
...
@@ -615,11 +615,11 @@ bytesio_write(bytesio *self, PyObject *obj)
...
@@ -615,11 +615,11 @@ bytesio_write(bytesio *self, PyObject *obj)
}
}
PyDoc_STRVAR
(
writelines_doc
,
PyDoc_STRVAR
(
writelines_doc
,
"writelines(
sequence_of_strings) -> None. Write string
s to the file.
\n
"
"writelines(
lines) -> None. Write bytes object
s to the file.
\n
"
"
\n
"
"
\n
"
"Note that newlines are not added. The
sequence
can be any iterable
\n
"
"Note that newlines are not added. The
argument
can be any iterable
\n
"
"object producing
string
s. This is equivalent to calling write() for
\n
"
"object producing
bytes object
s. This is equivalent to calling write() for
\n
"
"each
string
."
);
"each
bytes object
."
);
static
PyObject
*
static
PyObject
*
bytesio_writelines
(
bytesio
*
self
,
PyObject
*
v
)
bytesio_writelines
(
bytesio
*
self
,
PyObject
*
v
)
...
...
Modules/_io/fileio.c
View file @
b817b77a
...
@@ -667,7 +667,7 @@ fileio_readall(fileio *self)
...
@@ -667,7 +667,7 @@ fileio_readall(fileio *self)
if
(
bufsize
>
PY_SSIZE_T_MAX
||
bufsize
<=
0
)
{
if
(
bufsize
>
PY_SSIZE_T_MAX
||
bufsize
<=
0
)
{
PyErr_SetString
(
PyExc_OverflowError
,
PyErr_SetString
(
PyExc_OverflowError
,
"unbounded read returned more bytes "
"unbounded read returned more bytes "
"than a Python
string
can hold"
);
"than a Python
bytes object
can hold"
);
Py_DECREF
(
result
);
Py_DECREF
(
result
);
return
NULL
;
return
NULL
;
}
}
...
@@ -1111,13 +1111,13 @@ PyDoc_STRVAR(read_doc,
...
@@ -1111,13 +1111,13 @@ PyDoc_STRVAR(read_doc,
"
\n
"
"
\n
"
"Only makes one system call, so less data may be returned than requested
\n
"
"Only makes one system call, so less data may be returned than requested
\n
"
"In non-blocking mode, returns None if no data is available.
\n
"
"In non-blocking mode, returns None if no data is available.
\n
"
"
On end-of-file, returns ''
."
);
"
Return an empty bytes object at EOF
."
);
PyDoc_STRVAR
(
readall_doc
,
PyDoc_STRVAR
(
readall_doc
,
"readall() -> bytes. read all data from the file, returned as bytes.
\n
"
"readall() -> bytes. read all data from the file, returned as bytes.
\n
"
"
\n
"
"
\n
"
"In non-blocking mode, returns as much as is immediately available,
\n
"
"In non-blocking mode, returns as much as is immediately available,
\n
"
"or None if no data is available.
On end-of-file, returns ''
."
);
"or None if no data is available.
Return an empty bytes object at EOF
."
);
PyDoc_STRVAR
(
write_doc
,
PyDoc_STRVAR
(
write_doc
,
"write(b: bytes) -> int. Write bytes b to file, return number written.
\n
"
"write(b: bytes) -> int. Write bytes b to file, return number written.
\n
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment