diff Python/Python-ast.c @ 72195:321b8372eef6

Merge 3.2
author Éric Araujo <merwok@netwok.org>
date Fri, 02 Sep 2011 17:32:30 +0200
parents cfccc755c457
children 81380082d216
line wrap: on
line diff
--- a/Python/Python-ast.c	Fri Sep 02 17:30:55 2011 +0200
+++ b/Python/Python-ast.c	Fri Sep 02 17:32:30 2011 +0200
@@ -604,7 +604,7 @@
 
 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;
     }