README

Kaida-Amethyst/python/cpython does not have a README file

#
ArrayPyObjectRef

type ArrayPyObjectRef

#
CStr

type CStr

#
CWStr

type CWStr

#
PyCodeObjectRef

type PyCodeObjectRef

#
PyObjectRef

type PyObjectRef

#
PyObjectRef::dump

fn PyObjectRef::dump(self : PyObjectRef) -> Unit

#
PyObjectRef::is_bool

fn PyObjectRef::is_bool(self : PyObjectRef) -> Bool

#
PyObjectRef::is_callable

fn PyObjectRef::is_callable(self : PyObjectRef) -> Bool

#
PyObjectRef::is_dict

fn PyObjectRef::is_dict(self : PyObjectRef) -> Bool

#
PyObjectRef::is_float

fn PyObjectRef::is_float(self : PyObjectRef) -> Bool

#
PyObjectRef::is_function

fn PyObjectRef::is_function(self : PyObjectRef) -> Bool

#
PyObjectRef::is_int

fn PyObjectRef::is_int(self : PyObjectRef) -> Bool

#
PyObjectRef::is_list

fn PyObjectRef::is_list(self : PyObjectRef) -> Bool

#
PyObjectRef::is_module

fn PyObjectRef::is_module(self : PyObjectRef) -> Bool

#
PyObjectRef::is_null

fn PyObjectRef::is_null(self : PyObjectRef) -> Bool

#
PyObjectRef::is_set

fn PyObjectRef::is_set(self : PyObjectRef) -> Bool

#
PyObjectRef::is_string

fn PyObjectRef::is_string(self : PyObjectRef) -> Bool

#
PyThreadStateRef

type PyThreadStateRef

#
PyTypeObjectRef

type PyTypeObjectRef

#
__py_callable_check

fn __py_callable_check(a : PyObjectRef) -> Int

#
__py_dict_contains

fn __py_dict_contains(dict : PyObjectRef, key : PyObjectRef) -> Int

#
_py_context_new_hamt_for_tests

fn _py_context_new_hamt_for_tests() -> PyObjectRef

fn print_pyobject(obj : PyObjectRef) -> Unit

#
py_bool_check

fn py_bool_check(obj : PyObjectRef) -> Bool

#
py_bool_from_long

fn py_bool_from_long(value : Int64) -> PyObjectRef

#
py_call_iter_new

fn py_call_iter_new(a : PyObjectRef, b : PyObjectRef) -> PyObjectRef

#
py_callable_check

fn py_callable_check(a : PyObjectRef) -> Bool

#
py_cell_get

fn py_cell_get(a : PyObjectRef) -> PyObjectRef

#
py_cell_new

fn py_cell_new(a : PyObjectRef) -> PyObjectRef

#
py_cell_set

fn py_cell_set(a : PyObjectRef, b : PyObjectRef) -> Int

#
py_class_method_new

fn py_class_method_new(a : PyObjectRef) -> PyObjectRef

#
py_code_addr2_line

fn py_code_addr2_line(a : PyCodeObjectRef, b : Int) -> Int

#
py_code_new

fn py_code_new(a : Int, b : Int, c : Int, d : Int, e : Int, f : PyObjectRef, g : PyObjectRef, h : PyObjectRef, i : PyObjectRef, j : PyObjectRef, k : PyObjectRef, l : PyObjectRef, m : PyObjectRef, n : Int, o : PyObjectRef) -> PyCodeObjectRef

#
py_code_new_empty

fn py_code_new_empty(filename : CStr, funcname : CStr, firstlineno : Int) -> PyCodeObjectRef

#
py_code_new_with_pos_only_args

fn py_code_new_with_pos_only_args(a : Int, b : Int, c : Int, d : Int, e : Int, f : Int, g : PyObjectRef, h : PyObjectRef, i : PyObjectRef, j : PyObjectRef, k : PyObjectRef, l : PyObjectRef, m : PyObjectRef, n : PyObjectRef, o : Int, p : PyObjectRef) -> PyCodeObjectRef

#
py_codec_backslash_replace_errors

fn py_codec_backslash_replace_errors(exc : PyObjectRef) -> PyObjectRef

#
py_codec_decode

fn py_codec_decode(object : PyObjectRef, encoding : CStr, errors : CStr) -> PyObjectRef

#
py_codec_decoder

fn py_codec_decoder(encoding : CStr) -> PyObjectRef

#
py_codec_encode

fn py_codec_encode(object : PyObjectRef, encoding : CStr, errors : CStr) -> PyObjectRef

#
py_codec_encoder

fn py_codec_encoder(encoding : CStr) -> PyObjectRef

#
py_codec_ignore_errors

fn py_codec_ignore_errors(exc : PyObjectRef) -> PyObjectRef

#
py_codec_incremental_decoder

fn py_codec_incremental_decoder(encoding : CStr, errors : CStr) -> PyObjectRef

#
py_codec_incremental_encoder

fn py_codec_incremental_encoder(encoding : CStr, errors : CStr) -> PyObjectRef

#
py_codec_known_encoding

fn py_codec_known_encoding(encoding : CStr) -> Int

#
py_codec_lookup_error

fn py_codec_lookup_error(name : CStr) -> PyObjectRef

#
py_codec_name_replace_errors

fn py_codec_name_replace_errors(exc : PyObjectRef) -> PyObjectRef

#
py_codec_register

fn py_codec_register(search_function : PyObjectRef) -> Int

#
py_codec_register_error

fn py_codec_register_error(name : CStr, error : PyObjectRef) -> Int

#
py_codec_replace_errors

fn py_codec_replace_errors(exc : PyObjectRef) -> PyObjectRef

#
py_codec_stream_reader

fn py_codec_stream_reader(encoding : CStr, stream : PyObjectRef, errors : CStr) -> PyObjectRef

#
py_codec_stream_writer

fn py_codec_stream_writer(encoding : CStr, stream : PyObjectRef, errors : CStr) -> PyObjectRef

#
py_codec_strict_errors

fn py_codec_strict_errors(exc : PyObjectRef) -> PyObjectRef

#
py_codec_xml_char_ref_replace_errors

fn py_codec_xml_char_ref_replace_errors(exc : PyObjectRef) -> PyObjectRef

#
py_complex_from_doubles

fn py_complex_from_doubles(real : Double, imag : Double) -> PyObjectRef

#
py_complex_imag_as_double

fn py_complex_imag_as_double(op : PyObjectRef) -> Double

#
py_complex_real_as_double

fn py_complex_real_as_double(op : PyObjectRef) -> Double

#
py_context_clear_free_list

fn py_context_clear_free_list() -> Int

#
py_context_copy

fn py_context_copy(a : PyObjectRef) -> PyObjectRef

#
py_context_copy_current

fn py_context_copy_current() -> PyObjectRef

#
py_context_enter

fn py_context_enter(a : PyObjectRef) -> Int

#
py_context_exit

fn py_context_exit(a : PyObjectRef) -> Int

#
py_context_new

fn py_context_new() -> PyObjectRef

#
py_context_var_get

fn py_context_var_get(pyvar : PyObjectRef, default_value : PyObjectRef, value : ArrayPyObjectRef) -> Int

#
py_context_var_new

fn py_context_var_new(name : CStr, default_value : PyObjectRef) -> PyObjectRef

#
py_context_var_reset

fn py_context_var_reset(pyvar : PyObjectRef, token : PyObjectRef) -> Int

#
py_context_var_set

fn py_context_var_set(pyvar : PyObjectRef, value : PyObjectRef) -> PyObjectRef

#
py_decref

fn py_decref(obj : PyObjectRef) -> Unit

#
py_dict_check

fn py_dict_check(obj : PyObjectRef) -> Bool

#
py_dict_clear

fn py_dict_clear(dict : PyObjectRef) -> Unit

#
py_dict_contains

fn py_dict_contains(dict : PyObjectRef, key : PyObjectRef) -> Bool

#
py_dict_copy

fn py_dict_copy(dict : PyObjectRef) -> PyObjectRef

#
py_dict_del_item

fn py_dict_del_item(dict : PyObjectRef, key : PyObjectRef) -> Int

#
py_dict_del_item_string

fn py_dict_del_item_string(dict : PyObjectRef, key : String) -> Int

#
py_dict_get_item

fn py_dict_get_item(dict : PyObjectRef, key : PyObjectRef) -> PyObjectRef

#
py_dict_get_item_string

fn py_dict_get_item_string(dict : PyObjectRef, key : String) -> PyObjectRef

#
py_dict_items

fn py_dict_items(dict : PyObjectRef) -> PyObjectRef

#
py_dict_keys

fn py_dict_keys(dict : PyObjectRef) -> PyObjectRef

#
py_dict_merge

fn py_dict_merge(dict : PyObjectRef, other : PyObjectRef, _override : Int) -> Int

#
py_dict_merge_from_seq2

fn py_dict_merge_from_seq2(dict : PyObjectRef, seq2 : PyObjectRef, override_ : Int) -> Int

#
py_dict_new

fn py_dict_new() -> PyObjectRef

#
py_dict_set_item

fn py_dict_set_item(dict : PyObjectRef, key : PyObjectRef, item : PyObjectRef) -> Int

#
py_dict_set_item_string

fn py_dict_set_item_string(dict : PyObjectRef, key : String, item : PyObjectRef) -> Int

#
py_dict_size

fn py_dict_size(dict : PyObjectRef) -> UInt64

#
py_dict_update

fn py_dict_update(dict : PyObjectRef, other : PyObjectRef) -> Int

#
py_dict_values

fn py_dict_values(dict : PyObjectRef) -> PyObjectRef

#
py_err_clear

fn py_err_clear() -> Unit

#
py_err_occurred

fn py_err_occurred() -> PyObjectRef

#
py_err_print

fn py_err_print() -> Unit

#
py_eval_acquire_thread

fn py_eval_acquire_thread(tstate : PyThreadStateRef) -> Unit

#
py_eval_call_object_with_keywords

fn py_eval_call_object_with_keywords(callable : PyObjectRef, args : PyObjectRef, kwargs : PyObjectRef) -> PyObjectRef

#
py_eval_eval_code

fn py_eval_eval_code(a : PyObjectRef, b : PyObjectRef, c : PyObjectRef) -> PyObjectRef

#
py_eval_get_builtins

fn py_eval_get_builtins() -> PyObjectRef

#
py_eval_get_func_desc

fn py_eval_get_func_desc(a : PyObjectRef) -> CStr

#
py_eval_get_func_name

fn py_eval_get_func_name(a : PyObjectRef) -> CStr

#
py_eval_get_globals

fn py_eval_get_globals() -> PyObjectRef

#
py_eval_get_locals

fn py_eval_get_locals() -> PyObjectRef

#
py_eval_init_threads

fn py_eval_init_threads() -> Unit

#
py_eval_release_thread

fn py_eval_release_thread(tstate : PyThreadStateRef) -> Unit

#
py_eval_restore_thread

fn py_eval_restore_thread(a : PyThreadStateRef) -> Unit

#
py_eval_save_thread

fn py_eval_save_thread() -> PyThreadStateRef

#
py_eval_threads_initialized

fn py_eval_threads_initialized() -> Int

#
py_file_from_fd

fn py_file_from_fd(fd : Int, name : CStr, mode : CStr, closefd : Int, encoding : CStr, errors : CStr, newline : CStr, line_buffering : Int) -> PyObjectRef

#
py_file_get_line

fn py_file_get_line(a : PyObjectRef, b : Int) -> PyObjectRef

#
py_file_new_std_printer

fn py_file_new_std_printer(a : Int) -> PyObjectRef

#
py_file_open_code

fn py_file_open_code(utf8path : CStr) -> PyObjectRef

#
py_file_open_code_object

fn py_file_open_code_object(path : PyObjectRef) -> PyObjectRef

#
py_file_write_object

fn py_file_write_object(a : PyObjectRef, b : PyObjectRef, c : Int) -> Int

#
py_file_write_string

fn py_file_write_string(s : CStr, a : PyObjectRef) -> Int

#
py_finalize

fn py_finalize() -> Unit

#
py_float_as_double

fn py_float_as_double(obj : PyObjectRef) -> Double

#
py_float_check

fn py_float_check(obj : PyObjectRef) -> Bool

#
py_float_from_double

fn py_float_from_double(value : Double) -> PyObjectRef

#
py_float_from_string

fn py_float_from_string(obj : PyObjectRef) -> PyObjectRef

#
py_float_get_info

fn py_float_get_info() -> PyObjectRef

#
py_float_get_max

fn py_float_get_max() -> Double

#
py_float_get_min

fn py_float_get_min() -> Double

#
py_frozen_set_new

fn py_frozen_set_new(a : PyObjectRef) -> PyObjectRef

#
py_function_check

fn py_function_check(f : PyObjectRef) -> Bool

#
py_function_get_annotations

fn py_function_get_annotations(a : PyObjectRef) -> PyObjectRef

#
py_function_get_closure

fn py_function_get_closure(a : PyObjectRef) -> PyObjectRef

#
py_function_get_code

fn py_function_get_code(a : PyObjectRef) -> PyObjectRef

#
py_function_get_defaults

fn py_function_get_defaults(a : PyObjectRef) -> PyObjectRef

#
py_function_get_globals

fn py_function_get_globals(a : PyObjectRef) -> PyObjectRef

#
py_function_get_kw_defaults

fn py_function_get_kw_defaults(a : PyObjectRef) -> PyObjectRef

#
py_function_get_module

fn py_function_get_module(a : PyObjectRef) -> PyObjectRef

#
py_function_new

fn py_function_new(a : PyObjectRef, b : PyObjectRef) -> PyObjectRef

#
py_function_new_with_qual_name

fn py_function_new_with_qual_name(a : PyObjectRef, b : PyObjectRef, c : PyObjectRef) -> PyObjectRef

#
py_function_set_annotations

fn py_function_set_annotations(a : PyObjectRef, b : PyObjectRef) -> Int

#
py_function_set_closure

fn py_function_set_closure(a : PyObjectRef, b : PyObjectRef) -> Int

#
py_function_set_defaults

fn py_function_set_defaults(a : PyObjectRef, b : PyObjectRef) -> Int

#
py_function_set_kw_defaults

fn py_function_set_kw_defaults(a : PyObjectRef, b : PyObjectRef) -> Int

#
py_get_recursion_limit

fn py_get_recursion_limit() -> Int

#
py_import_add_module

fn py_import_add_module(name : CStr) -> PyObjectRef

#
py_import_add_module_object

fn py_import_add_module_object(name : PyObjectRef) -> PyObjectRef

#
py_import_cleanup

fn py_import_cleanup() -> Unit

#
py_import_exec_code_module

fn py_import_exec_code_module(name : CStr, co : PyObjectRef) -> PyObjectRef

#
py_import_exec_code_module_ex

fn py_import_exec_code_module_ex(name : CStr, co : PyObjectRef, pathname : CStr) -> PyObjectRef

#
py_import_exec_code_module_object

fn py_import_exec_code_module_object(name : PyObjectRef, co : PyObjectRef, pathname : PyObjectRef, cpathname : PyObjectRef) -> PyObjectRef

#
py_import_exec_code_module_with_pathnames

fn py_import_exec_code_module_with_pathnames(name : CStr, co : PyObjectRef, pathname : CStr, cpathname : CStr) -> PyObjectRef

#
py_import_get_importer

fn py_import_get_importer(path : PyObjectRef) -> PyObjectRef

#
py_import_get_magic_number

fn py_import_get_magic_number() -> Int

#
py_import_get_magic_tag

fn py_import_get_magic_tag() -> CStr

#
py_import_get_module

fn py_import_get_module(name : PyObjectRef) -> PyObjectRef

#
py_import_get_module_dict

fn py_import_get_module_dict() -> PyObjectRef

#
py_import_import

fn py_import_import(name : PyObjectRef) -> PyObjectRef

#
py_import_import_frozen_module

fn py_import_import_frozen_module(name : CStr) -> Int

#
py_import_import_frozen_module_object

fn py_import_import_frozen_module_object(name : PyObjectRef) -> Int

#
py_import_import_module

fn py_import_import_module(name : String) -> PyObjectRef

#
py_import_import_module_level

fn py_import_import_module_level(name : CStr, globals : PyObjectRef, locals : PyObjectRef, fromlist : PyObjectRef, level : Int) -> PyObjectRef

#
py_import_import_module_level_object

fn py_import_import_module_level_object(name : PyObjectRef, globals : PyObjectRef, locals : PyObjectRef, fromlist : PyObjectRef, level : Int) -> PyObjectRef

#
py_import_import_module_no_block

fn py_import_import_module_no_block(name : CStr) -> PyObjectRef

#
py_import_reload_module

fn py_import_reload_module(m : PyObjectRef) -> PyObjectRef

#
py_incref

fn py_incref(obj : PyObjectRef) -> Unit

#
py_init

fn py_init() -> Unit

#
py_instance_method_function

fn py_instance_method_function(a : PyObjectRef) -> PyObjectRef

#
py_instance_method_new

fn py_instance_method_new(a : PyObjectRef) -> PyObjectRef

#
py_int_check

fn py_int_check(obj : PyObjectRef) -> Bool

#
py_is_initialized

fn py_is_initialized() -> Bool

#
py_list_append

fn py_list_append(list : PyObjectRef, item : PyObjectRef) -> Int

#
py_list_as_tuple

fn py_list_as_tuple(list : PyObjectRef) -> PyObjectRef

#
py_list_check

fn py_list_check(obj : PyObjectRef) -> Bool

#
py_list_get_item

fn py_list_get_item(list : PyObjectRef, idx : Int64) -> PyObjectRef

#
py_list_get_slice

fn py_list_get_slice(list : PyObjectRef, start : Int64, end : Int64) -> PyObjectRef

#
py_list_insert

fn py_list_insert(list : PyObjectRef, idx : Int64, item : PyObjectRef) -> Int

#
py_list_new

fn py_list_new(sz : Int64) -> PyObjectRef

#
py_list_reverse

fn py_list_reverse(list : PyObjectRef) -> Int

#
py_list_set_item

fn py_list_set_item(list : PyObjectRef, idx : Int64, item : PyObjectRef) -> Int

#
py_list_set_slice

fn py_list_set_slice(list : PyObjectRef, start : Int64, end : Int64, new_list : PyObjectRef) -> Int

#
py_list_size

fn py_list_size(list : PyObjectRef) -> Int64

#
py_list_sort

fn py_list_sort(list : PyObjectRef) -> Int

#
py_long_as_double

fn py_long_as_double(obj : PyObjectRef) -> Double

#
py_long_as_long

fn py_long_as_long(obj : PyObjectRef) -> Int64

#
py_long_from_long

fn py_long_from_long(value : Int64) -> PyObjectRef

#
py_make_pending_calls

fn py_make_pending_calls() -> Int

#
py_method_clear_free_list

fn py_method_clear_free_list() -> Int

#
py_method_function

fn py_method_function(a : PyObjectRef) -> PyObjectRef

#
py_method_new

fn py_method_new(a : PyObjectRef, b : PyObjectRef) -> PyObjectRef

#
py_method_self

fn py_method_self(a : PyObjectRef) -> PyObjectRef

#
py_module_check

fn py_module_check(obj : PyObjectRef) -> Bool

#
py_module_get_dict

fn py_module_get_dict(a : PyObjectRef) -> PyObjectRef

#
py_module_get_filename_object

fn py_module_get_filename_object(a : PyObjectRef) -> PyObjectRef

#
py_module_get_name

fn py_module_get_name(a : PyObjectRef) -> CStr

#
py_module_get_name_object

fn py_module_get_name_object(a : PyObjectRef) -> PyObjectRef

#
py_module_new

fn py_module_new(name : CStr) -> PyObjectRef

#
py_module_new_object

fn py_module_new_object(name : PyObjectRef) -> PyObjectRef

#
py_none_check

fn py_none_check(obj : PyObjectRef) -> Bool

#
py_object_as_file_descriptor

fn py_object_as_file_descriptor(a : PyObjectRef) -> Int

#
py_object_ascii

fn py_object_ascii(a : PyObjectRef) -> PyObjectRef

#
py_object_bytes

fn py_object_bytes(a : PyObjectRef) -> PyObjectRef

#
py_object_call

fn py_object_call(callable : PyObjectRef, args : PyObjectRef, kwargs : PyObjectRef) -> PyObjectRef

Call a callable Python object 'callable' with arguments given by the tuple 'args' and keywords arguments given by the dictionary 'kwargs'.

'args' must not be NULL, use an empty tuple if no arguments are needed. If no named arguments are needed, 'kwargs' can be NULL.

This is the equivalent of the Python expression: callable(*args, **kwargs).

#
py_object_call_object

fn py_object_call_object(callable : PyObjectRef, args : PyObjectRef) -> PyObjectRef

Call a callable Python object 'callable', with arguments given by the tuple 'args'. If no arguments are needed, then 'args' can be NULL.

Returns the result of the call on success, or NULL on failure.

This is the equivalent of the Python expression: callable(*args).

#
py_object_clear_weak_refs

fn py_object_clear_weak_refs(a : PyObjectRef) -> Unit

#
py_object_del_item

fn py_object_del_item(obj : PyObjectRef, key : PyObjectRef) -> Int

Delete the mapping for the object 'key' from the object 'o'. Returns -1 on failure.

This is the equivalent of the Python statement: del o[key].

#
py_object_del_item_string

fn py_object_del_item_string(obj : PyObjectRef, key : CStr) -> Int

Remove the mapping for the string 'key' from the object 'o'. Returns -1 on failure.

This is equivalent to the Python statement: del o[key].

#
py_object_dir

fn py_object_dir(a : PyObjectRef) -> PyObjectRef

#
py_object_generic_get_attr

fn py_object_generic_get_attr(a : PyObjectRef, b : PyObjectRef) -> PyObjectRef

#
py_object_generic_set_attr

fn py_object_generic_set_attr(a : PyObjectRef, b : PyObjectRef, c : PyObjectRef) -> Int

#
py_object_get_attr

fn py_object_get_attr(a : PyObjectRef, b : PyObjectRef) -> PyObjectRef

#
py_object_get_attr_string

fn py_object_get_attr_string(a : PyObjectRef, b : String) -> PyObjectRef

#
py_object_get_item

fn py_object_get_item(obj : PyObjectRef, key : PyObjectRef) -> PyObjectRef

Return element of 'o' corresponding to the object 'key'. Return NULL on failure.

This is the equivalent of the Python expression: o[key] */

#
py_object_get_iter

fn py_object_get_iter(obj : PyObjectRef) -> PyObjectRef

Takes an object and returns an iterator for it. This is typically a new iterator but if the argument is an iterator, this returns itself. */

#
py_object_has_attr

fn py_object_has_attr(a : PyObjectRef, b : PyObjectRef) -> Int

#
py_object_has_attr_string

fn py_object_has_attr_string(a : PyObjectRef, b : String) -> Int

#
py_object_is_instance

fn py_object_is_instance(obj : PyObjectRef, typeorclass : PyObjectRef) -> Int

#
py_object_is_subclass

fn py_object_is_subclass(obj : PyObjectRef, typeorclass : PyObjectRef) -> Int

#
py_object_is_true

fn py_object_is_true(a : PyObjectRef) -> Bool

#
py_object_moonbit_repr

fn py_object_moonbit_repr(obj : PyObjectRef) -> String

PyObject repr to string

#
py_object_moonbit_str

fn py_object_moonbit_str(obj : PyObjectRef) -> String

PyObject str to string

#
py_object_not

fn py_object_not(a : PyObjectRef) -> Int

#
py_object_repr

fn py_object_repr(a : PyObjectRef) -> PyObjectRef

#
py_object_rich_compare

fn py_object_rich_compare(a : PyObjectRef, b : PyObjectRef, c : Int) -> PyObjectRef

#
py_object_rich_compare_bool

fn py_object_rich_compare_bool(a : PyObjectRef, b : PyObjectRef, c : Int) -> Int

#
py_object_self_iter

fn py_object_self_iter(a : PyObjectRef) -> PyObjectRef

#
py_object_set_attr

fn py_object_set_attr(a : PyObjectRef, b : PyObjectRef, c : PyObjectRef) -> Int

#
py_object_set_attr_string

fn py_object_set_attr_string(a : PyObjectRef, b : String, c : PyObjectRef) -> Int

#
py_object_set_item

fn py_object_set_item(obj : PyObjectRef, key : PyObjectRef, value : PyObjectRef) -> Int

Map the object 'key' to the value 'v' into 'o'.

Raise an exception and return -1 on failure; return 0 on success.

This is the equivalent of the Python statement: o[key]=v. */

#
py_object_size

fn py_object_size(obj : PyObjectRef) -> UInt64

Return the size of object 'o'. If the object 'o' provides both sequence and mapping protocols, the sequence size is returned.

On error, -1 is returned.

This is the equivalent to the Python expression: len(o) */

#
py_object_str

fn py_object_str(a : PyObjectRef) -> PyObjectRef

#
py_object_type

fn py_object_type(obj : PyObjectRef) -> PyObjectRef

Get the type of an object.

On success, returns a type object corresponding to the object type of object 'o'. On failure, returns NULL.

This is equivalent to the Python expression: type(o)

#
py_odict_del_item

fn py_odict_del_item(od : PyObjectRef, key : PyObjectRef) -> Int

#
py_odict_new

fn py_odict_new() -> PyObjectRef

#
py_odict_set_item

fn py_odict_set_item(od : PyObjectRef, key : PyObjectRef, item : PyObjectRef) -> Int

#
py_repr_enter

fn py_repr_enter(a : PyObjectRef) -> Int

#
py_repr_leave

fn py_repr_leave(a : PyObjectRef) -> Unit

#
py_seq_iter_new

fn py_seq_iter_new(a : PyObjectRef) -> PyObjectRef

#
py_set_add

fn py_set_add(set : PyObjectRef, key : PyObjectRef) -> Int

#
py_set_check

fn py_set_check(obj : PyObjectRef) -> Bool

#
py_set_clear

fn py_set_clear(set : PyObjectRef) -> Int

#
py_set_contains

fn py_set_contains(anyset : PyObjectRef, key : PyObjectRef) -> Int

#
py_set_discard

fn py_set_discard(set : PyObjectRef, key : PyObjectRef) -> Int

#
py_set_new

fn py_set_new(a : PyObjectRef) -> PyObjectRef

#
py_set_pop

fn py_set_pop(set : PyObjectRef) -> PyObjectRef

#
py_set_recursion_limit

fn py_set_recursion_limit(a : Int) -> Unit

#
py_set_size

fn py_set_size(anyset : PyObjectRef) -> Int64

#
py_static_method_new

fn py_static_method_new(a : PyObjectRef) -> PyObjectRef

#
py_string_check

fn py_string_check(obj : PyObjectRef) -> Bool

#
py_tuple_check

fn py_tuple_check(obj : PyObjectRef) -> Bool

#
py_type

fn py_type(obj : PyObjectRef) -> PyTypeObjectRef

#
py_type_name

fn py_type_name(t : PyTypeObjectRef) -> String

#
py_unicode_as_moonbit_string

fn py_unicode_as_moonbit_string(u : PyObjectRef) -> String

#
py_unicode_as_utf16_string

fn py_unicode_as_utf16_string(u : PyObjectRef) -> PyObjectRef

#
py_unicode_as_utf8

fn py_unicode_as_utf8(u : PyObjectRef) -> String

#
py_unicode_from_moonbit_string

fn py_unicode_from_moonbit_string(s : String) -> PyObjectRef

#
py_unicode_from_string

fn py_unicode_from_string(s : String) -> PyObjectRef

#
py_unicode_from_string_and_size

fn py_unicode_from_string_and_size(u : CStr, size : UInt64) -> PyObjectRef

#
py_unicode_from_unicode

fn py_unicode_from_unicode(u : CWStr, size : UInt64) -> PyObjectRef

#
pyindex_check

fn pyindex_check(obj : PyObjectRef) -> Int

Returns 1 if obj is an index integer (has the nb_index slot of the tp_as_number structure filled in), and 0 otherwise.

#
pyiter_check

fn pyiter_check(obj : PyObjectRef) -> Int

Returns 1 if the object 'obj' provides iterator protocols, and 0 otherwise.

This function always succeeds. */

#
pyiter_next

fn pyiter_next(iter : PyObjectRef) -> PyObjectRef

Takes an iterator object and calls its tp_iternext slot, returning the next value.

If the iterator is exhausted, this returns NULL without setting an exception.

NULL with an exception means an error occurred. */

#
pymapping_check

fn pymapping_check(obj : PyObjectRef) -> Int

Return 1 if the object provides mapping protocol, and 0 otherwise.

This function always succeeds.

#
pymapping_get_item_string

fn pymapping_get_item_string(obj : PyObjectRef, key : CStr) -> PyObjectRef

#
pymapping_has_key

fn pymapping_has_key(obj : PyObjectRef, key : PyObjectRef) -> Int

Return 1 if the mapping object has the key 'key', and 0 otherwise.

This is equivalent to the Python expression: key in o.

This function always succeeds.

#
pymapping_has_key_string

fn pymapping_has_key_string(obj : PyObjectRef, key : CStr) -> Int

On success, return 1 if the mapping object 'o' has the key 'key', and 0 otherwise.

This is equivalent to the Python expression: key in o.

This function always succeeds. */

#
pymapping_items

fn pymapping_items(obj : PyObjectRef) -> PyObjectRef

On success, return a list or tuple of the items in mapping object 'o', where each item is a tuple containing a key-value pair. On failure, return NULL.

#
pymapping_keys

fn pymapping_keys(obj : PyObjectRef) -> PyObjectRef

On success, return a list or tuple of the keys in mapping object 'o'. On failure, return NULL. */

#
pymapping_set_item_string

fn pymapping_set_item_string(obj : PyObjectRef, key : CStr, value : PyObjectRef) -> Int

#
pymapping_size

fn pymapping_size(obj : PyObjectRef) -> Int

Returns the number of keys in mapping object 'o' on success, and -1 on failure. This is equivalent to the Python expression: len(o). */

#
pymapping_values

fn pymapping_values(obj : PyObjectRef) -> PyObjectRef

On success, return a list or tuple of the values in mapping object 'o'. On failure, return NULL.

#
pynumber_absolute

fn pynumber_absolute(obj : PyObjectRef) -> PyObjectRef

Returns the absolute value of 'o', or NULL on failure.

This is the equivalent of the Python expression: abs(o).

#
pynumber_add

fn pynumber_add(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of adding o1 and o2, or NULL on failure.

This is the equivalent of the Python expression: o1 + o2. */

#
pynumber_and

fn pynumber_and(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of bitwise and of o1 and o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 & o2.

#
pynumber_as_ssize_t

fn pynumber_as_ssize_t(obj : PyObjectRef, exc : PyObjectRef) -> Int

Returns the object 'o' converted to Py_ssize_t by going through PyNumber_Index() first.

If an overflow error occurs while converting the int to Py_ssize_t, then the second argument 'exc' is the error-type to return. If it is NULL, then the overflow error is cleared and the value is clipped.

#
pynumber_check

fn pynumber_check(obj : PyObjectRef) -> Int

Returns 1 if the object 'o' provides numeric protocols, and 0 otherwise.

This function always succeeds. */

#
pynumber_divmod

fn pynumber_divmod(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

See the built-in function divmod.

Returns NULL on failure.

This is the equivalent of the Python expression: divmod(o1, o2).

#
pynumber_float

fn pynumber_float(obj : PyObjectRef) -> PyObjectRef

Returns the object 'o' converted to a float object on success, or NULL on failure.

This is the equivalent of the Python expression: float(o).

#
pynumber_floor_divide

fn pynumber_floor_divide(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of dividing o1 by o2 giving an integral result, or NULL on failure.

This is the equivalent of the Python expression: o1 // o2. */

#
pynumber_index

fn pynumber_index(obj : PyObjectRef) -> PyObjectRef

Returns the object 'o' converted to a Python int, or NULL with an exception raised on failure.

#
pynumber_inplace_add

fn pynumber_inplace_add(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of adding o2 to o1, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 += o2.

#
pynumber_inplace_and

fn pynumber_inplace_and(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of bitwise and of o1 and o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 &= o2.

#
pynumber_inplace_floor_divide

fn pynumber_inplace_floor_divide(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

#
pynumber_inplace_lshift

fn pynumber_inplace_lshift(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of left shifting o1 by o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 <<= o2.

#
pynumber_inplace_multiply

fn pynumber_inplace_multiply(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of multiplying o1 by o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 *= o2.

#
pynumber_inplace_or

fn pynumber_inplace_or(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of bitwise or of o1 and o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 |= o2.

#
pynumber_inplace_power

fn pynumber_inplace_power(obj1 : PyObjectRef, obj2 : PyObjectRef, obj3 : PyObjectRef) -> PyObjectRef

Returns the result of raising o1 to the power of o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 **= o2, or o1 = pow(o1, o2, o3) if o3 is present.

#
pynumber_inplace_remainder

fn pynumber_inplace_remainder(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the remainder of dividing o1 by o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 %= o2.

#
pynumber_inplace_rshift

fn pynumber_inplace_rshift(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of right shifting o1 by o2, possibly in-place or NULL on failure.

This is the equivalent of the Python expression: o1 >>= o2.

#
pynumber_inplace_subtract

fn pynumber_inplace_subtract(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of subtracting o2 from o1, possibly in-place or NULL on failure.

This is the equivalent of the Python expression: o1 -= o2.

#
pynumber_inplace_true_divide

fn pynumber_inplace_true_divide(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of dividing o1 by o2 giving a float result, possibly in-place, or null on failure.

This is the equivalent of the Python expression: o1 /= o2.

#
pynumber_inplace_xor

fn pynumber_inplace_xor(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the bitwise exclusive or of o1 by o2, possibly in-place, or NULL on failure.

This is the equivalent of the Python expression: o1 ^= o2.

#
pynumber_invert

fn pynumber_invert(obj : PyObjectRef) -> PyObjectRef

Returns the bitwise negation of 'o' on success, or NULL on failure.

This is the equivalent of the Python expression: ~o.

#
pynumber_long

fn pynumber_long(obj : PyObjectRef) -> PyObjectRef

Returns the object 'o' converted to an integer object on success, or NULL on failure.

This is the equivalent of the Python expression: int(o).

#
pynumber_lshift

fn pynumber_lshift(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of left shifting o1 by o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 << o2.

#
pynumber_multiply

fn pynumber_multiply(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of multiplying o1 and o2, or NULL on failure.

This is the equivalent of the Python expression: o1 * o2. */

#
pynumber_negative

fn pynumber_negative(obj : PyObjectRef) -> PyObjectRef

Returns the negation of o on success, or NULL on failure.

This is the equivalent of the Python expression: -o.

#
pynumber_or

fn pynumber_or(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of bitwise or on o1 and o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 | o2.

#
pynumber_positive

fn pynumber_positive(obj : PyObjectRef) -> PyObjectRef

Returns the positive of o on success, or NULL on failure.

This is the equivalent of the Python expression: +o.

#
pynumber_power

fn pynumber_power(obj1 : PyObjectRef, obj2 : PyObjectRef, obj3 : PyObjectRef) -> PyObjectRef

See the built-in function pow. Returns NULL on failure.

This is the equivalent of the Python expression: pow(o1, o2, o3), where o3 is optional.

#
pynumber_remainder

fn pynumber_remainder(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the remainder of dividing o1 by o2, or NULL on failure.

This is the equivalent of the Python expression: o1 % o2.

#
pynumber_rshift

fn pynumber_rshift(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of right shifting o1 by o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 >> o2.

#
pynumber_subtract

fn pynumber_subtract(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of subtracting o2 from o1, or NULL on failure.

This is the equivalent of the Python expression: o1 - o2. */

#
pynumber_to_base

fn pynumber_to_base(obj : PyObjectRef, base : Int) -> PyObjectRef

Returns the integer n converted to a string with a base, with a base marker of 0b, 0o or 0x prefixed if applicable.

If n is not an int object, it is converted with PyNumber_Index first. */

#
pynumber_true_divide

fn pynumber_true_divide(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the result of dividing o1 by o2 giving a float result, or NULL on failure.

This is the equivalent of the Python expression: o1 / o2.

#
pynumber_xor

fn pynumber_xor(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Returns the bitwise exclusive or of o1 by o2 on success, or NULL on failure.

This is the equivalent of the Python expression: o1 ^ o2.

#
pyobkect_format

fn pyobkect_format(obj : PyObjectRef, format_spec : PyObjectRef) -> PyObjectRef

Takes an arbitrary object and returns the result of calling obj.format(format_spec).

#
pysequence_check

fn pysequence_check(obj : PyObjectRef) -> Int

Return 1 if the object provides sequence protocol, and zero otherwise.

This function always succeeds.

#
pysequence_concat

fn pysequence_concat(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Return the concatenation of o1 and o2 on success, and NULL on failure.

This is the equivalent of the Python expression: o1 + o2. */

#
pysequence_contains

fn pysequence_contains(seq : PyObjectRef, ob : PyObjectRef) -> Int

Return 1 if 'ob' is in the sequence 'seq'; 0 if 'ob' is not in the sequence 'seq'; -1 on error.

Use contains if possible, else _PySequence_IterSearch().

#
pysequence_count

fn pysequence_count(obj : PyObjectRef, value : PyObjectRef) -> Int

#
pysequence_del_item

fn pysequence_del_item(obj : PyObjectRef, idx : UInt64) -> Int

Delete the 'i'-th element of the sequence 'v'. Returns -1 on failure.

This is the equivalent of the Python statement: del o[i]. */

#
pysequence_del_slice

fn pysequence_del_slice(obj : PyObjectRef, start : UInt64, end : UInt64) -> Int

Delete the slice in sequence object 'o' from 'i1' to 'i2'. Returns -1 on failure.

This is the equivalent of the Python statement: del o[i1:i2]. */

#
pysequence_fast

fn pysequence_fast(obj : PyObjectRef, msg : CStr) -> PyObjectRef

Return the sequence 'o' as a list, unless it's already a tuple or list.

Use PySequence_Fast_GET_ITEM to access the members of this list, and PySequence_Fast_GET_SIZE to get its length.

Returns NULL on failure. If the object does not support iteration, raises a TypeError exception with 'm' as the message text. */

#
pysequence_get_item

fn pysequence_get_item(obj : PyObjectRef, idx : UInt64) -> PyObjectRef

Return the ith element of o, or NULL on failure.

This is the equivalent of the Python expression: o[i].

#
pysequence_get_slice

fn pysequence_get_slice(obj : PyObjectRef, start : UInt64, end : UInt64) -> PyObjectRef

Return the slice of sequence object o between i1 and i2, or NULL on failure.

This is the equivalent of the Python expression: o[i1:i2].

#
pysequence_index

fn pysequence_index(obj : PyObjectRef, value : PyObjectRef) -> Int

#
pysequence_inplace_concat

fn pysequence_inplace_concat(obj1 : PyObjectRef, obj2 : PyObjectRef) -> PyObjectRef

Append sequence 'o2' to sequence 'o1', in-place when possible. Return the resulting object, which could be 'o1', or NULL on failure.

This is the equivalent of the Python expression: o1 += o2. */

#
pysequence_inplace_repeat

fn pysequence_inplace_repeat(obj : PyObjectRef, count : Int) -> PyObjectRef

Repeat sequence 'o' by 'count', in-place when possible. Return the resulting object, which could be 'o', or NULL on failure.

This is the equivalent of the Python expression: o1 *= count. */

#
pysequence_list

fn pysequence_list(obj : PyObjectRef) -> PyObjectRef

Returns the sequence 'o' as a list on success, and NULL on failure. This is equivalent to the Python expression: list(o) */

#
pysequence_repeat

fn pysequence_repeat(obj : PyObjectRef, count : Int) -> PyObjectRef

Return the result of repeating sequence object 'o' 'count' times, or NULL on failure.

This is the equivalent of the Python expression: o * count. */

#
pysequence_set_item

fn pysequence_set_item(obj : PyObjectRef, idx : UInt64, value : PyObjectRef) -> Int

Assign object 'v' to the ith element of the sequence 'o'. Raise an exception and return -1 on failure; return 0 on success.

This is the equivalent of the Python statement o[i] = v. */

#
pysequence_set_slice

fn pysequence_set_slice(obj : PyObjectRef, start : UInt64, end : UInt64, new_list : PyObjectRef) -> Int

Assign the sequence object 'v' to the slice in sequence object 'o', from 'i1' to 'i2'. Returns -1 on failure.

This is the equivalent of the Python statement: o[i1:i2] = v. */

#
pysequence_size

fn pysequence_size(obj : PyObjectRef) -> Int

Return the size of sequence object o, or -1 on failure.

#
pysequence_tuple

fn pysequence_tuple(obj : PyObjectRef) -> PyObjectRef

Returns the sequence 'o' as a tuple on success, and NULL on failure.

This is equivalent to the Python expression: tuple(o). */

#
pytuple_get_item

fn pytuple_get_item(tuple : PyObjectRef, idx : UInt64) -> PyObjectRef

#
pytuple_get_slice

fn pytuple_get_slice(tuple : PyObjectRef, start : UInt64, end : UInt64) -> PyObjectRef

#
pytuple_new

fn pytuple_new(sz : UInt64) -> PyObjectRef

#
pytuple_set_item

fn pytuple_set_item(tuple : PyObjectRef, idx : UInt64, item : PyObjectRef) -> Int

#
pytuple_size

fn pytuple_size(tuple : PyObjectRef) -> UInt64