Skip to content

Commit 70d0bfe

Browse files
committed
use full lookup for __module__ and __qualname__ in type repr
1 parent debfbeb commit 70d0bfe

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ public abstract static class ReprNode extends PythonUnaryBuiltinNode {
111111

112112
@Specialization
113113
public String repr(PythonClass self,
114-
@Cached("create()") ReadAttributeFromObjectNode readModuleNode,
115-
@Cached("create()") ReadAttributeFromObjectNode readQualNameNode) {
116-
Object moduleName = readModuleNode.execute(self, __MODULE__);
117-
Object qualName = readQualNameNode.execute(self, __QUALNAME__);
114+
@Cached("create(__GETATTRIBUTE__)") LookupAndCallBinaryNode readModuleNode,
115+
@Cached("create(__GETATTRIBUTE__)") LookupAndCallBinaryNode readQualNameNode) {
116+
Object moduleName = readModuleNode.executeObject(self, __MODULE__);
117+
Object qualName = readQualNameNode.executeObject(self, __QUALNAME__);
118118
return concat(moduleName, qualName);
119119
}
120120

0 commit comments

Comments
 (0)