code object
function object as created by a function
definition and subsequently called.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv PyDict | annotations
The |
| pack-priv final Object | builtins
The read-only |
| protected PyCell[] | closure
The read-only |
| protected C | code
The |
| protected Object[] | defaults
The (positional) |
| private PyDict | dict
The |
| pack-priv Object | doc
The |
| pack-priv final PyDict | globals
The read-only |
| pack-priv final Interpreter | interpreter
The interpreter that defines the import context. |
| protected PyDict | kwdefaults
The |
| pack-priv Object | module
The |
| pack-priv String | name
The function name ( |
| private String | qualname
The function qualified name ( |
| pack-priv static final PyType | TYPE
The type of Python object this class implements. |
| Access | Constructor and Description |
|---|---|
| pack-priv | PyFunction(Interpreter
providing the module context not interpreter, C nullto execute not code, PyDict nullname space to treat as global variables not
globals, Object[] nulldefault positional argument values or
defaults, PyDict nulldefault keyword argument values or kwdefaults, Object nulltype annotations ( annotations, PyCell[] dict, null
or maybe tuple)variables referenced but not defined here, must be
size expected by code or closure)null if empty.Create a PyFunction supplying most of the attributes at construction time. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract Object | |
| private Object | |
| private Object | |
| pack-priv abstract PyFrame | Returns: the framename space to treat as local variables locals)Create a |
| private Object | Returns: the__builtins__ of the functionLook in |
| public Map | getDict()
Implements org. dict or
writable.
|
| pack-priv Interpreter | Returns: interpreter that defines the import contextGet the interpreter that defines the import context, which was current when this function was defined. |
| public PyType | getType()
Overrides org. Implements org. type of this object.
|
| public String | toString()
Overrides org. |
| annotations | back to summary |
|---|---|
| pack-priv PyDict annotations The | |
| builtins | back to summary |
|---|---|
| pack-priv final Object builtins The read-only
| |
| closure | back to summary |
|---|---|
| protected PyCell[] closure The read-only | |
| code | back to summary |
|---|---|
| protected C code The | |
| defaults | back to summary |
|---|---|
| protected Object[] defaults The (positional) | |
| dict | back to summary |
|---|---|
| private PyDict dict The | |
| doc | back to summary |
|---|---|
| pack-priv Object doc The
| |
| globals | back to summary |
|---|---|
| pack-priv final PyDict globals The read-only
| |
| interpreter | back to summary |
|---|---|
| pack-priv final Interpreter interpreter The interpreter that defines the import context. Not
| |
| kwdefaults | back to summary |
|---|---|
| protected PyDict kwdefaults The | |
| module | back to summary |
|---|---|
| pack-priv Object module The
| |
| name | back to summary |
|---|---|
| pack-priv String name The function name ( | |
| qualname | back to summary |
|---|---|
| private String qualname The function qualified name ( | |
| TYPE | back to summary |
|---|---|
| pack-priv static final PyType TYPE The type of Python object this class implements. | |
| PyFunction | back to summary |
|---|---|
| pack-priv PyFunction(Interpreter interpreter, C code, PyDict globals, Object[] defaults, PyDict kwdefaults, Object annotations, PyCell[] closure) Create a PyFunction supplying most of the attributes at construction time.
The strongly-typed Implementation Note We differ from CPython in requiring a reference to the
interpreter as an argument. Also, we favour a constructor in
which the attributes are supplied
| |
| __call__ | back to summary |
|---|---|
| pack-priv abstract Object __call__(Object[] args, String[] names) throws Throwable Canonical
the return from the call
| |
| __repr__ | back to summary |
|---|---|
private Object __repr__()
| |
| __str__ | back to summary |
|---|---|
private Object __str__()
| |
| createFrame | back to summary |
|---|---|
| pack-priv abstract PyFrame Create a | |
| getBuiltinsFromGlobals | back to summary |
|---|---|
| private Object getBuiltinsFromGlobals() Look in
| |
| getDict | back to summary |
|---|---|
| public Map Implements org. Doc from org. The dictionary of the instance, (not necessarily a Python | |
| getInterpreter | back to summary |
|---|---|
| pack-priv Interpreter getInterpreter() Get the interpreter that defines the import context, which was
current when this function was defined. Not
| |
| getType | back to summary |
|---|---|
| public PyType getType() Overrides org. Implements org. Doc from org. The Python | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object. | |