summaryrefslogtreecommitdiff
path: root/Parser
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-09-02 17:32:30 +0200
committerÉric Araujo <merwok@netwok.org>2011-09-02 17:32:30 +0200
commit6f08f53e797848b6e2f5e7eeaf20f9dcaba3e28b (patch)
tree253d2788c0e129c3e790359ef72b2cc2a6ac6771 /Parser
parent677dc7189f6c79f1a534f6e8de89758593934cb3 (diff)
parentd9e1789364ede11e1d48b7ba1afe0369c78c6424 (diff)
downloadcpython-git-6f08f53e797848b6e2f5e7eeaf20f9dcaba3e28b.tar.gz
Merge 3.2
Diffstat (limited to 'Parser')
-rwxr-xr-xParser/asdl_c.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 0b95aaa1e8..c66082eb02 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;
}