Skip to content

Commit 97b361e

Browse files
committed
fix getting the class __module__ attr - for cases when the attr is not set
1 parent e9ab5c4 commit 97b361e

File tree

1 file changed

+1
-2
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type

1 file changed

+1
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/type/TypeBuiltins.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@ public abstract static class ReprNode extends PythonUnaryBuiltinNode {
111111

112112
@Specialization
113113
public String repr(PythonClass self,
114-
@Cached("create(__GETATTRIBUTE__)") LookupAndCallBinaryNode readModuleNode,
115114
@Cached("create(__GETATTRIBUTE__)") LookupAndCallBinaryNode readQualNameNode) {
116-
Object moduleName = readModuleNode.executeObject(self, __MODULE__);
115+
Object moduleName = self.getAttribute(__MODULE__);
117116
Object qualName = readQualNameNode.executeObject(self, __QUALNAME__);
118117
return concat(moduleName, qualName);
119118
}

0 commit comments

Comments
 (0)