Top Description Fields Constructors Methods
org.python.core

pack-priv Class BuiltinsModule

extends JavaModule
Class Inheritance
Imports
java.lang.invoke.MethodHandles, java.util.Iterator, org.python.core.Exposed.Default, .Exposed.DocString, .Exposed.KeywordOnly, .Exposed.Name, .Exposed.PositionalCollector, .Exposed.PythonStaticMethod

The builtins module is definitely called "builtins".

Although it is fully a module, the BuiltinsModule lives in the core package because it needs privileged access to the core implementation that extension modules do not.

Field Summary

Modifier and TypeField and Description
private static final String
private static final ModuleDef
Inherited from org.python.core.JavaModule:
definition

Constructor Summary

AccessConstructor and Description
pack-priv
BuiltinsModule()

Construct an instance of the builtins module.

Method Summary

Modifier and TypeMethod and Description
pack-priv static Object
pack-priv static Object
pack-priv static Object

Returns:

max result or dflt
max
(Object
a first argument or iterable of arguments
arg1
,
Object
function
key
,
Object
to return when iterable is empty
dflt
,
PyTuple
contains other positional arguments
args
)

Implementation of max().

pack-priv static Object

Returns:

min result or dflt
min
(Object
a first argument or iterable of arguments
arg1
,
Object
function
key
,
Object
to return when iterable is empty
dflt
,
PyTuple
contains other positional arguments
args
)

Implementation of min().

private static Object

Returns:

min or max result as appropriate
minmax
(Object
a first argument or iterable of arguments
arg1
,
PyTuple
contains other positional arguments
args
,
Object
function
key
,
Object
to return when iterable is empty
dflt
,
Comparison
LT for min and GT for max.
op
)

Implementation of both min() and max().

pack-priv static Object
repr(Object obj)

Inherited from org.python.core.JavaModule:
exec

Field Detail

DEFAULT_WITHOUT_ITERABLEback to summary
private static final String DEFAULT_WITHOUT_ITERABLE
DEFINITIONback to summary
private static final ModuleDef DEFINITION

Constructor Detail

BuiltinsModuleback to summary
pack-priv BuiltinsModule()

Construct an instance of the builtins module.

Method Detail

absback to summary
pack-priv static Object abs(Object x) throws Throwable
Annotations
@PythonStaticMethod
@DocString:Return the absolute value of the argument.
lenback to summary
pack-priv static Object len(Object v) throws Throwable
Annotations
@PythonStaticMethod
@DocString:Return the number of items in a container.
maxback to summary
pack-priv static Object max(Object arg1, Object key, Object dflt, PyTuple args) throws Throwable

Implementation of max().

Parameters
arg1:Object

a first argument or iterable of arguments

key:Object

function

dflt:Object

to return when iterable is empty

args:PyTuple

contains other positional arguments

Returns:Object

max result or dflt

Annotations
@PythonStaticMethod
positionalOnly:false
@DocString:Return the largest item in an iterable or the largest of two or more arguments.
Exceptions
Throwable:
from calling key or comparison

minback to summary
pack-priv static Object min(Object arg1, Object key, Object dflt, PyTuple args) throws Throwable

Implementation of min().

Parameters
arg1:Object

a first argument or iterable of arguments

key:Object

function

dflt:Object

to return when iterable is empty

args:PyTuple

contains other positional arguments

Returns:Object

min result or dflt

Annotations
@PythonStaticMethod
positionalOnly:false
@DocString:Return the smallest item in an iterable or the smallest of two or more arguments.
Exceptions
Throwable:
from calling key or comparison

minmaxback to summary
private static Object minmax(Object arg1, PyTuple args, Object key, Object dflt, Comparison op) throws Throwable

Implementation of both min() and max().

Parameters
arg1:Object

a first argument or iterable of arguments

args:PyTuple

contains other positional arguments

key:Object

function

dflt:Object

to return when iterable is empty

op:Comparison

LT for min and GT for max.

Returns:Object

min or max result as appropriate

Exceptions
Throwable:
from calling op or key

reprback to summary
pack-priv static Object repr(Object obj) throws Throwable
Annotations
@PythonStaticMethod
@DocString:Return the canonical string representation of the object. For many object types, including most builtins, eval(repr(obj)) == obj.