mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #16495: remove extraneous NULL encoding check from bytes_decode().
The NULL encoding check in bytes_decode() was unnecessary because this case is already taken care of by the call to _Py_normalize_encoding() inside PyUnicode_Decode().
This commit is contained in:
parent
527507d72e
commit
e7f2186f99
2 changed files with 2 additions and 2 deletions
|
@ -2236,8 +2236,6 @@ bytes_decode(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", kwlist, &encoding, &errors))
|
||||
return NULL;
|
||||
if (encoding == NULL)
|
||||
encoding = PyUnicode_GetDefaultEncoding();
|
||||
return PyUnicode_FromEncodedObject(self, encoding, errors);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue