Skip to content

Commit 97f868c

Browse files
committed
minor fix for method.__repr__
1 parent 93e2424 commit 97f868c

File tree

1 file changed

+3
-3
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/method

1 file changed

+3
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/method/MethodBuiltins.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ public abstract static class ReprNode extends PythonUnaryBuiltinNode {
133133
Object reprMethod(VirtualFrame frame, PMethod self,
134134
@CachedLibrary("self.getSelf()") PythonObjectLibrary lib,
135135
@Cached("createGetAttributeNode()") GetAttributeNode getNameAttrNode,
136-
@Cached("create()") GetNameNode getTypeNameNode) {
136+
@Cached GetNameNode getTypeNameNode) {
137137
String typeName = getTypeNameNode.execute(lib.getLazyPythonClass(self.getSelf()));
138-
return strFormat("<built-in method %s of %s object at 0x%x>", getNameAttrNode.executeObject(frame, self.getFunction()), typeName, hashCode(self));
138+
return strFormat("<bound method %s of %s object at 0x%x>", getNameAttrNode.executeObject(frame, self.getFunction()), typeName, hashCode(self));
139139
}
140140

141141
@TruffleBoundary(allowInlining = true)
@@ -149,7 +149,7 @@ private static String strFormat(String fmt, Object... objects) {
149149
}
150150

151151
protected static GetAttributeNode createGetAttributeNode() {
152-
return GetAttributeNode.create(SpecialAttributeNames.__NAME__, null);
152+
return GetAttributeNode.create(SpecialAttributeNames.__QUALNAME__, null);
153153
}
154154
}
155155

0 commit comments

Comments
 (0)