summaryrefslogtreecommitdiffstats
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-09-02 15:32:30 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-09-02 15:32:30 (GMT)
commit6f08f53e797848b6e2f5e7eeaf20f9dcaba3e28b (patch)
tree253d2788c0e129c3e790359ef72b2cc2a6ac6771 /Python/Python-ast.c
parent677dc7189f6c79f1a534f6e8de89758593934cb3 (diff)
parentd9e1789364ede11e1d48b7ba1afe0369c78c6424 (diff)
downloadcpython-6f08f53e797848b6e2f5e7eeaf20f9dcaba3e28b.zip
cpython-6f08f53e797848b6e2f5e7eeaf20f9dcaba3e28b.tar.gz
cpython-6f08f53e797848b6e2f5e7eeaf20f9dcaba3e28b.tar.bz2
Merge 3.2
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index f6e345c..ff79757 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -604,7 +604,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;
}