Skip to content

Commit

Permalink
Only warn in file init
Browse files Browse the repository at this point in the history
  • Loading branch information
nanjekyejoannah committed May 22, 2023
1 parent b6f80d7 commit 2e6fb73
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Python/bltinmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1504,11 +1504,6 @@ Return the octal representation of an integer or long integer.");
static PyObject *
builtin_open(PyObject *self, PyObject *args, PyObject *kwds)
{
if (PyErr_WarnPy3k("The builtin 'open()' function is not supported in 3.x, "
"use the 'io.open()' function instead with the encoding keyword argument", 1) < 0){
return NULL;
}

return PyObject_Call((PyObject*)&PyFile_Type, args, kwds);
}

Expand Down

0 comments on commit 2e6fb73

Please sign in to comment.