mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merged revisions 76805 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76805 | benjamin.peterson | 2009-12-13 13:19:07 -0600 (Sun, 13 Dec 2009) | 7 lines accept None as the same as having passed no argument in file types #7349 This is for consistency with imitation file objects like StringIO and BytesIO. This commit also adds a few tests, where they were lacking for concerned methods. ........
This commit is contained in:
parent
229663775d
commit
bf5ff76597
9 changed files with 80 additions and 17 deletions
|
@ -1479,7 +1479,7 @@ textiowrapper_read(textio *self, PyObject *args)
|
|||
|
||||
CHECK_INITIALIZED(self);
|
||||
|
||||
if (!PyArg_ParseTuple(args, "|n:read", &n))
|
||||
if (!PyArg_ParseTuple(args, "|O&:read", &_PyIO_ConvertSsize_t, &n))
|
||||
return NULL;
|
||||
|
||||
CHECK_CLOSED(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue