diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/Python-ast.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 4956d04..7aa1c51 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -5221,6 +5221,13 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw) goto set_remaining_cleanup; } } + else if (type == state->expr_context_type) { + // special case for expr_context: default to Load() + res = PyObject_SetAttr(self, name, state->Load_singleton); + if (res < 0) { + goto set_remaining_cleanup; + } + } else { // simple field (e.g., identifier) if (PyErr_WarnFormat( |