summaryrefslogtreecommitdiff
path: root/Objects/moduleobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r--Objects/moduleobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index 4b4f9d1958..32c4b9e385 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -415,8 +415,9 @@ module_clear(PyModuleObject *m)
static PyObject *
module_dir(PyObject *self, PyObject *args)
{
+ _Py_identifier(__dict__);
PyObject *result = NULL;
- PyObject *dict = PyObject_GetAttrString(self, "__dict__");
+ PyObject *dict = _PyObject_GetAttrId(self, &PyId___dict__);
if (dict != NULL) {
if (PyDict_Check(dict))