Commits

Armin Rigo committed 39ad99d

Backport of r52862.

  • Participants
  • Parent commits c7a8cb0
  • Branches 2.4

Comments (0)

Files changed (1)

File Python/ceval.c

 		value = PyObject_GetAttr(v, name);
 		if (value == NULL)
 			err = -1;
+		else if (PyDict_CheckExact(locals))
+			err = PyDict_SetItem(locals, name, value);
 		else
-			err = PyDict_SetItem(locals, name, value);
+			err = PyObject_SetItem(locals, name, value);
 		Py_DECREF(name);
 		Py_XDECREF(value);
 		if (err != 0)