summaryrefslogtreecommitdiffstats
path: root/Modules/_io/clinic
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-09-14 09:24:05 (GMT)
committerGitHub <noreply@github.com>2019-09-14 09:24:05 (GMT)
commit279f44678c8b84a183f9eeb85e0b086228154497 (patch)
tree9cacd41975bf15ab7a94fc5ba6a2df57f8e02ee5 /Modules/_io/clinic
parentd057b896f97e6d7447b9bf9246770c41cf205299 (diff)
downloadcpython-279f44678c8b84a183f9eeb85e0b086228154497.zip
cpython-279f44678c8b84a183f9eeb85e0b086228154497.tar.gz
cpython-279f44678c8b84a183f9eeb85e0b086228154497.tar.bz2
bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933)
In ArgumentClinic, value "NULL" should now be used only for unrepresentable default values (like in the optional third parameter of getattr). "None" should be used if None is accepted as argument and passing None has the same effect as not passing the argument at all.
Diffstat (limited to 'Modules/_io/clinic')
-rw-r--r--Modules/_io/clinic/fileio.c.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_io/clinic/fileio.c.h b/Modules/_io/clinic/fileio.c.h
index 64addde..53e7067 100644
--- a/Modules/_io/clinic/fileio.c.h
+++ b/Modules/_io/clinic/fileio.c.h
@@ -408,7 +408,7 @@ static PyObject *
_io_FileIO_truncate(fileio *self, PyObject *const *args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
- PyObject *posobj = NULL;
+ PyObject *posobj = Py_None;
if (!_PyArg_CheckPositional("truncate", nargs, 0, 1)) {
goto exit;
@@ -447,4 +447,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored))
#ifndef _IO_FILEIO_TRUNCATE_METHODDEF
#define _IO_FILEIO_TRUNCATE_METHODDEF
#endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */
-/*[clinic end generated code: output=a7e9cca3613660fb input=a9049054013a1b77]*/
+/*[clinic end generated code: output=e7682d0a3264d284 input=a9049054013a1b77]*/