Skip to content

Commit 88a3dff

Browse files
committed
use <lambda> instead of anonymous as name for function creation when name is not provided
1 parent eafb2c1 commit 88a3dff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/BuiltinConstructors.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,7 @@ public PFunction function(LazyPythonClass cls, PCode code, PDict globals, String
21812181
@Specialization
21822182
public PFunction function(LazyPythonClass cls, PCode code, PDict globals, @SuppressWarnings("unused") PNone name, @SuppressWarnings("unused") PNone defaultArgs, PTuple closure,
21832183
@Shared("getObjectArrayNode") @Cached GetObjectArrayNode getObjectArrayNode) {
2184-
return factory().createFunction("anonymous", getTypeName(cls), code, globals, getClosure(getObjectArrayNode.execute(closure)));
2184+
return factory().createFunction("<lambda>", getTypeName(cls), code, globals, getClosure(getObjectArrayNode.execute(closure)));
21852185
}
21862186

21872187
@Specialization

0 commit comments

Comments
 (0)