Skip to content

Commit ce3edfe

Browse files
committed
Don't add implicit __text_signature__ to normal functions
1 parent 8117210 commit ce3edfe

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/function/AbstractFunctionBuiltins.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,10 @@ Object builtinCode(PBuiltinFunction self, Object mapping) {
305305
public abstract static class TextSignatureNode extends PythonBinaryBuiltinNode {
306306
@Specialization(guards = {"!isBuiltinFunction(self)", "isNoValue(none)"})
307307
Object getFunction(PFunction self, @SuppressWarnings("unused") PNone none,
308-
@Cached("create()") ReadAttributeFromObjectNode readNode,
309-
@Cached("create()") WriteAttributeToObjectNode writeNode) {
308+
@Cached("create()") ReadAttributeFromObjectNode readNode) {
310309
Object signature = readNode.execute(self, __TEXT_SIGNATURE__);
311310
if (signature == PNone.NO_VALUE) {
312-
signature = getSignature(self.getSignature());
313-
writeNode.execute(self, __TEXT_SIGNATURE__, signature);
311+
throw raise(AttributeError, "'function' object has no attribute '__text_signature__'");
314312
}
315313
return signature;
316314
}

0 commit comments

Comments
 (0)