Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae0b088

Browse files
committed
There is no reason for imp.get_magic() to return a mutable bytearray
1 parent be5229e commit ae0b088

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2686,7 +2686,7 @@ imp_get_magic(PyObject *self, PyObject *noargs)
26862686
buf[2] = (char) ((pyc_magic >> 16) & 0xff);
26872687
buf[3] = (char) ((pyc_magic >> 24) & 0xff);
26882688

2689-
return PyBytes_FromStringAndSize(buf, 4);
2689+
return PyString_FromStringAndSize(buf, 4);
26902690
}
26912691

26922692
static PyObject *

0 commit comments

Comments
 (0)