📄 pycompoundcallable.java
字号:
// Copyright (c) Corporation for National Research Initiativespackage org.python.core;import java.util.Vector;public class PyCompoundCallable extends PyObject { private Vector callables; private PySystemState systemState; public PyCompoundCallable () { callables = new Vector(); systemState = Py.getSystemState(); } public void append(PyObject callable) { callables.addElement(callable); } public void clear() { callables.removeAllElements(); } public PyObject __call__(PyObject[] args, String[] keywords) { // Set the system state to handle callbacks from java threads Py.setSystemState(systemState); int n = callables.size(); //System.out.println("callable: "+n); for (int i=0; i<n; i++) { ((PyObject)callables.elementAt(i)).__call__(args, keywords); } return Py.None; } public String toString() { return "<CompoundCallable with "+callables.size()+" callables>"; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -