summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-07-22 22:20:58 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-07-22 22:20:58 (GMT)
commit5eed3062f5e80eced5c3601004466786f4ace70a (patch)
treefcd03d81731b032b78a4db77130fa1948c6cc4e3 /Parser
parent6c18ff0808029fd91dd4bfb6f216c1bb59452526 (diff)
downloadcpython-5eed3062f5e80eced5c3601004466786f4ace70a.zip
cpython-5eed3062f5e80eced5c3601004466786f4ace70a.tar.gz
cpython-5eed3062f5e80eced5c3601004466786f4ace70a.tar.bz2
allow None identifiers
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 8aba6b3..6a46549 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -802,7 +802,7 @@ static int obj2ast_object(PyObject* obj, PyObject** out, PyArena* arena)
static int obj2ast_identifier(PyObject* obj, PyObject** out, PyArena* arena)
{
- if (!PyString_CheckExact(obj)) {
+ if (!PyString_CheckExact(obj) && obj != Py_None) {
PyErr_Format(PyExc_TypeError,
"AST identifier must be of type str");
return 1;