diff options
Diffstat (limited to 'Parser/asdl_c.py')
-rwxr-xr-x | Parser/asdl_c.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py index 0b95aaa..c66082e 100755 --- a/Parser/asdl_c.py +++ b/Parser/asdl_c.py @@ -807,7 +807,7 @@ static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena) static int obj2ast_string(PyObject* obj, PyObject** out, PyArena* arena) { - if (!PyUnicode_CheckExact(obj)) { + if (!PyUnicode_CheckExact(obj) && !PyBytes_CheckExact(obj)) { PyErr_SetString(PyExc_TypeError, "AST string must be of type str"); return 1; } |