Skip to content

Commit 1b0530a

Browse files
committed
Add TODO to remove overriding '__reduce__' method.
1 parent 197e477 commit 1b0530a

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ Object defaults(PMethod self,
113113
public abstract static class ReduceNode extends PythonUnaryBuiltinNode {
114114
@Specialization
115115
Object doGeneric(@SuppressWarnings("unused") Object obj) {
116+
// TODO we should not override '__reduce__' but properly distinguish between heap/non
117+
// heap types
116118
throw raise(TypeError, "can't pickle function objects");
117119
}
118120
}

0 commit comments

Comments
 (0)