Top Description Fields Constructors Methods
org.python.core

pack-priv Class CPython311Function

extends PyFunction<CPython311Code>
Class Inheritance

A PyFunction defined in CPython 3.11 byte code.

Field Summary

Modifier and TypeField and Description
private ArgParser
argParser

Argument parser matched to code.

Inherited from org.python.core.PyFunction:
annotationsbuiltinsclosurecodedefaultsdocglobalsinterpreterkwdefaultsmodulenameTYPE

Constructor Summary

AccessConstructor and Description
pack-priv
CPython311Function(Interpreter
providing the module context
interpreter
,
CPython311Code
defining the function
code
,
PyDict
name space to treat as global variables
globals
,
Object[]
default positional argument values
defaults
,
PyDict
default keyword argument values
kwdefaults
,
Object
type annotations
annotations
,
PyCell[]
variable referenced but not defined here, must be the same size as code
closure
)

Create a Python function object defined in CPython 3.11 code (full-featured constructor).

public
CPython311Function(Interpreter
providing the module context
interpreter
,
CPython311Code
defining the function
code
,
PyDict
name space to treat as global variables
globals
)

Create a Python function object defined in CPython 3.11 code in a simplified form suitable to represent execution of a top-level module.

Method Summary

Modifier and TypeMethod and Description
pack-priv Object
__call__(Object[]
all the arguments (position then keyword)
args
,
String[]
of the keyword arguments (or null)
names
)

Implements abstract org.python.core.PyFunction.__call__.

Canonical __call__ slot with Jython conventions, making function implementations callable.
pack-priv CPython311Frame
createFrame(Object
name space to treat as local variables
locals
)

Implements abstract org.python.core.PyFunction.createFrame.

Create a PyFrame that will execute this PyFunction.
Inherited from org.python.core.PyFunction:
getDictgetInterpretergetTypetoString

Field Detail

argParserback to summary
private ArgParser argParser

Argument parser matched to code.

Constructor Detail

CPython311Functionback to summary
pack-priv CPython311Function(Interpreter interpreter, CPython311Code code, PyDict globals, Object[] defaults, PyDict kwdefaults, Object annotations, PyCell[] closure)

Create a Python function object defined in CPython 3.11 code (full-featured constructor).

Parameters
interpreter:Interpreter

providing the module context

code:CPython311Code

defining the function

globals:PyDict

name space to treat as global variables

defaults:Object[]

default positional argument values

kwdefaults:PyDict

default keyword argument values

annotations:Object

type annotations

closure:PyCell[]

variable referenced but not defined here, must be the same size as code

CPython311Functionback to summary
public CPython311Function(Interpreter interpreter, CPython311Code code, PyDict globals)

Create a Python function object defined in CPython 3.11 code in a simplified form suitable to represent execution of a top-level module.

Parameters
interpreter:Interpreter

providing the module context

code:CPython311Code

defining the function

globals:PyDict

name space to treat as global variables

Method Detail

__call__back to summary
pack-priv Object __call__(Object[] args, String[] names) throws Throwable

Implements abstract org.python.core.PyFunction.__call__.

Doc from org.python.core.PyFunction.__call__.

Canonical __call__ slot with Jython conventions, making function implementations callable.

Parameters
args:Object[]

all the arguments (position then keyword)

names:String[]

of the keyword arguments (or null)

Returns:Object

the return from the call

Annotations
@Override
Exceptions
Throwable:
for errors raised in the function
createFrameback to summary
pack-priv CPython311Frame createFrame(Object locals)

Implements abstract org.python.core.PyFunction.createFrame.

Doc from org.python.core.PyFunction.createFrame.

Create a PyFrame that will execute this PyFunction. This frame should be "loose": PyFrame#back should be null and it should not be on any thread's stack.

Parameters
locals:Object

name space to treat as local variables

Returns:CPython311Frame

the frame

Annotations
@Override