package module
Version: v0.1.2 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2019 License: MIT Imports: 3 Imported by: 0



Golang bindings for the C-API of CPython-3.

This package provides a go package named "python" under which most of the PyXYZ functions and macros of the public C-API of CPython have been exposed. Theoretically, you should be able use and know what to type in your go program.

Currently supports python-3.7+.

This project was inspired by Go and take a look if we need something for python-2.7!


Simply go get


We will need pkg-config and a working python3 environment to build these bindings. By default pkg-config will look at the python3 library so if you want to choose a specific version just symlink python-X.Y.pc to python3.pc or use the PKG_CONFIG_PATH environment variable.


Some functions mix go code and call to Python function. Those functions will return and int and error type. The int represent the Python result code and the error represent any issue from the Go layer.


func PyRun_AnyFile(filename string) open filename and then call CPython API function int PyRun_AnyFile(FILE *fp, const char *filename).

Therefore its signature is func PyRun_AnyFile(filename string) (int, error), the int represent the error code from the CPython PyRun_AnyFile function and error will be set if we failed to open filename.

If an error is raise before calling th CPython function int default to -1.

Take a look at some examples




View Source
const MaxVariadicLength = 20

MaxVariadicLength is the maximum number of arguments that can be passed to a variadic C function due to a cgo limitation


View Source
var (
	Py_False = togo(C.Py_False)
	Py_True  = togo(C.Py_True)

python boolean constants

View Source
var (
	PyExc_BaseException          = togo(C.PyExc_BaseException)
	PyExc_Exception              = togo(C.PyExc_Exception)
	PyExc_ArithmeticError        = togo(C.PyExc_ArithmeticError)
	PyExc_AssertionError         = togo(C.PyExc_AssertionError)
	PyExc_AttributeError         = togo(C.PyExc_AttributeError)
	PyExc_BlockingIOError        = togo(C.PyExc_BlockingIOError)
	PyExc_BrokenPipeError        = togo(C.PyExc_BrokenPipeError)
	PyExc_BufferError            = togo(C.PyExc_BufferError)
	PyExc_ChildProcessError      = togo(C.PyExc_ChildProcessError)
	PyExc_ConnectionAbortedError = togo(C.PyExc_ConnectionAbortedError)
	PyExc_ConnectionError        = togo(C.PyExc_ConnectionError)
	PyExc_ConnectionRefusedError = togo(C.PyExc_ConnectionRefusedError)
	PyExc_ConnectcionResetError  = togo(C.PyExc_ConnectionResetError)
	PyExc_EOFError               = togo(C.PyExc_EOFError)
	PyExc_FileExistsError        = togo(C.PyExc_FileExistsError)
	PyExc_FileNotFoundError      = togo(C.PyExc_FileNotFoundError)
	PyExc_FloatingPointError     = togo(C.PyExc_FloatingPointError)
	PyExc_GeneratorExit          = togo(C.PyExc_GeneratorExit)
	PyExc_ImportError            = togo(C.PyExc_ImportError)
	PyExc_IndentationError       = togo(C.PyExc_IndentationError)
	PyExc_IndexError             = togo(C.PyExc_IndexError)
	PyExc_InterruptedError       = togo(C.PyExc_InterruptedError)
	PyExc_IsADirectoryError      = togo(C.PyExc_IsADirectoryError)
	PyExc_KeyError               = togo(C.PyExc_KeyError)
	PyExc_KeyboardInterrupt      = togo(C.PyExc_KeyboardInterrupt)
	PyExc_LookupError            = togo(C.PyExc_LookupError)
	PyExc_MemoryError            = togo(C.PyExc_MemoryError)
	PyExc_ModuleNotFoundError    = togo(C.PyExc_ModuleNotFoundError)
	PyExc_NameError              = togo(C.PyExc_NameError)
	PyExc_NotADirectoryError     = togo(C.PyExc_NotADirectoryError)
	PyExc_NotImplementedError    = togo(C.PyExc_NotImplementedError)
	PyExc_OSError                = togo(C.PyExc_OSError)
	PyExc_OverflowError          = togo(C.PyExc_OverflowError)
	PyExc_PermissionError        = togo(C.PyExc_PermissionError)
	PyExc_ProcessLookupError     = togo(C.PyExc_ProcessLookupError)
	PyExc_RecursionError         = togo(C.PyExc_RecursionError)
	PyExc_ReferenceError         = togo(C.PyExc_ReferenceError)
	PyExc_RuntimeError           = togo(C.PyExc_RuntimeError)
	PyExc_StopAsyncIteration     = togo(C.PyExc_StopAsyncIteration)
	PyExc_StopIteration          = togo(C.PyExc_StopIteration)
	PyExc_SyntaxError            = togo(C.PyExc_SyntaxError)
	PyExc_SystemError            = togo(C.PyExc_SystemError)
	PyExc_SystemExit             = togo(C.PyExc_SystemExit)
	PyExc_TabError               = togo(C.PyExc_TabError)
	PyExc_TimeoutError           = togo(C.PyExc_TimeoutError)
	PyExc_TypeError              = togo(C.PyExc_TypeError)
	PyExc_UnboundLocalError      = togo(C.PyExc_UnboundLocalError)
	PyExc_UnicodeDecodeError     = togo(C.PyExc_UnicodeDecodeError)
	PyExc_UnicodeEncodeError     = togo(C.PyExc_UnicodeEncodeError)
	PyExc_UnicodeError           = togo(C.PyExc_UnicodeError)
	PyExc_UnicodeTranslateError  = togo(C.PyExc_UnicodeTranslateError)
	PyExc_ValueError             = togo(C.PyExc_ValueError)
	PyExc_ZeroDivisionError      = togo(C.PyExc_ZeroDivisionError)

All standard Python exceptions are available as global variables whose names are PyExc_ followed by the Python exception name. These have the type PyObject*; they are all class objects.

View Source
var (
	Py_LT = int(C.Py_LT)
	Py_LE = int(C.Py_LE)
	Py_EQ = int(C.Py_EQ)
	Py_NE = int(C.Py_NE)
	Py_GT = int(C.Py_GT)
	Py_GE = int(C.Py_GE)

Constants used for comparison in PyObject_RichCompareBool

View Source
var (
	PyExc_Warning                   = togo(C.PyExc_Warning)
	PyExc_BytesWarning              = togo(C.PyExc_BytesWarning)
	PyExc_DeprecationWarning        = togo(C.PyExc_DeprecationWarning)
	PyExc_FutureWarning             = togo(C.PyExc_FutureWarning)
	PyExc_ImportWarning             = togo(C.PyExc_ImportWarning)
	PyExc_PendingDeprecationWarning = togo(C.PyExc_PendingDeprecationWarning)
	PyExc_ResourceWarning           = togo(C.PyExc_ResourceWarning)
	PyExc_RuntimeWarning            = togo(C.PyExc_RuntimeWarning)
	PyExc_SyntaxWarning             = togo(C.PyExc_SyntaxWarning)
	PyExc_UnicodeWarning            = togo(C.PyExc_UnicodeWarning)
	PyExc_UserWarning               = togo(C.PyExc_UserWarning)

All standard Python warning categories are available as global variables whose names are PyExc_ followed by the Python exception name. These have the type PyObject*; they are all class objects.

View Source
var Bool = togo((*C.PyObject)(unsafe.Pointer(&C.PyBool_Type)))

Bool :

View Source
var ByteArray = togo((*C.PyObject)(unsafe.Pointer(&C.PyByteArray_Type)))

ByteArray :

View Source
var Bytes = togo((*C.PyObject)(unsafe.Pointer(&C.PyBytes_Type)))

Bytes :

View Source
var Complex = togo((*C.PyObject)(unsafe.Pointer(&C.PyComplex_Type)))

Complex :

View Source
var Dict = togo((*C.PyObject)(unsafe.Pointer(&C.PyDict_Type)))

Dict :

View Source
var Float = togo((*C.PyObject)(unsafe.Pointer(&C.PyFloat_Type)))

Float :

View Source
var List = togo((*C.PyObject)(unsafe.Pointer(&C.PyList_Type)))

List :

View Source
var Long = togo((*C.PyObject)(unsafe.Pointer(&C.PyLong_Type)))

Long :

View Source
var Module = togo((*C.PyObject)(unsafe.Pointer(&C.PyModule_Type)))

Module :

View Source
var Py_None = togo(C.Py_None)

None :

View Source
var Tuple = togo((*C.PyObject)(unsafe.Pointer(&C.PyTuple_Type)))

Tuple :

View Source
var Type = togo((*C.PyObject)(unsafe.Pointer(&C.PyType_Type)))

Type :

View Source
var Unicode = togo((*C.PyObject)(unsafe.Pointer(&C.PyUnicode_Type)))

Unicode :


func PyByteArray_Resize

func PyByteArray_Resize(bytearray *PyObject, len int)

PyByteArray_Resize :

func PyDict_ClearFreeList

func PyDict_ClearFreeList() int

PyDict_ClearFreeList :

func PyDict_Contains

func PyDict_Contains(p, key *PyObject) int

PyDict_Contains :

func PyDict_DelItem

func PyDict_DelItem(p, key *PyObject) int

PyDict_DelItem :

func PyDict_DelItemString

func PyDict_DelItemString(p *PyObject, key string) int

PyDict_DelItemString :

func PyDict_Next

func PyDict_Next(p *PyObject, ppos *int, pkey, pvalue **PyObject) bool

PyDict_Next :

func PyDict_SetItem

func PyDict_SetItem(p, key, val *PyObject) int

PyDict_SetItem :

func PyDict_SetItemString

func PyDict_SetItemString(p *PyObject, key string, val *PyObject) int

PyDict_SetItemString :

func PyErr_GivenExceptionMatches

func PyErr_GivenExceptionMatches(given, exc *PyObject) bool

PyErr_GivenExceptionMatches :

func PyErr_NormalizeException

func PyErr_NormalizeException(exc, val, tb *PyObject) (*PyObject, *PyObject, *PyObject)

PyErr_NormalizeException :

func PyErr_PrintEx

func PyErr_PrintEx(setSysLastVars bool)

PyErr_PrintEx :

func PyErr_Restore

func PyErr_Restore(pyType *PyObject, value *PyObject, traceback *PyObject)

PyErr_Restore :

func PyErr_SetExcInfo

func PyErr_SetExcInfo(pyType *PyObject, value *PyObject, traceback *PyObject)

PyErr_SetExcInfo :

func PyErr_SetObject

func PyErr_SetObject(pyType, value *PyObject)

PyErr_SetObject :

func PyErr_SetString

func PyErr_SetString(pyType *PyObject, message string)

PyErr_SetString :

func PyErr_SyntaxLocation

func PyErr_SyntaxLocation(filename string, lineno int)

PyErr_SyntaxLocation :

func PyErr_SyntaxLocationEx

func PyErr_SyntaxLocationEx(filename string, lineno, col_offset int)

PyErr_SyntaxLocationEx :

func PyErr_SyntaxLocationObject

func PyErr_SyntaxLocationObject(filename *PyObject, lineno, col_offset int)

PyErr_SyntaxLocationObject :

func PyErr_WarnEx

func PyErr_WarnEx(category *PyObject, message string, stack_level int) int

PyErr_WarnEx :

func PyErr_WarnExplicit

func PyErr_WarnExplicit(category *PyObject, message string, filename string, lineno int, module string, registry *PyObject) int

PyErr_WarnExplicit :

func PyErr_WarnExplicitObject

func PyErr_WarnExplicitObject(category *PyObject, message *PyObject, filename *PyObject, lineno int, module *PyObject, registry *PyObject) int

PyErr_WarnExplicitObject :

func PyEval_InitThreads

func PyEval_InitThreads()

PyEval_InitThreads :

func PyEval_ReInitThreads

func PyEval_ReInitThreads()

PyEval_ReInitThreads :

func PyEval_RestoreThread

func PyEval_RestoreThread(tstate *PyThreadState)

PyEval_RestoreThread :

func PyEval_ThreadsInitialized

func PyEval_ThreadsInitialized() bool

PyEval_ThreadsInitialized :

func PyException_SetCause

func PyException_SetCause(ex, cause *PyObject)

PyException_SetCause :

func PyException_SetContext

func PyException_SetContext(ex, ctx *PyObject)

PyException_SetContext :

func PyException_SetTraceback

func PyException_SetTraceback(ex, tb *PyObject) int

PyException_SetTraceback :

func PyFloat_ClearFreeList

func PyFloat_ClearFreeList() int

PyFloat_ClearFreeList :

func PyGILState_Release

func PyGILState_Release(state PyGILState)

PyGILState_Release :

func PyImport_GetMagicNumber

func PyImport_GetMagicNumber() int

PyImport_GetMagicNumber :

func PyImport_ImportFrozenModule

func PyImport_ImportFrozenModule(name string) int

PyImport_ImportFrozenModule :

func PyImport_ImportFrozenModuleObject

func PyImport_ImportFrozenModuleObject(name *PyObject) int

PyImport_ImportFrozenModuleObject :

func PyList_Append

func PyList_Append(p, item *PyObject) int

PyList_Append :

func PyList_ClearFreeList

func PyList_ClearFreeList() int

PyList_ClearFreeList :

func PyList_Insert

func PyList_Insert(p *PyObject, index int, item *PyObject) int

PyList_Insert :

func PyList_SetSlice

func PyList_SetSlice(p *PyObject, low, high int, itemlist *PyObject) int

PyList_SetSlice :

func PyLong_AsLongAndOverflow

func PyLong_AsLongAndOverflow(obj *PyObject) (int, int)

PyLong_AsLongAndOverflow :

func PyLong_AsLongLongAndOverflow

func PyLong_AsLongLongAndOverflow(obj *PyObject) (int64, int)

PyLong_AsLongLongAndOverflow :

func PyLong_AsUnsignedLong

func PyLong_AsUnsignedLong(obj *PyObject) uint

PyLong_AsUnsignedLong :

func PyLong_AsUnsignedLongLong

func PyLong_AsUnsignedLongLong(obj *PyObject) uint64

PyLong_AsUnsignedLongLong :

func PyLong_AsUnsignedLongLongMask

func PyLong_AsUnsignedLongLongMask(obj *PyObject) uint64

PyLong_AsUnsignedLongLongMask :

func PyLong_AsUnsignedLongMask

func PyLong_AsUnsignedLongMask(obj *PyObject) uint

PyLong_AsUnsignedLongMask :

func PyRun_AnyFile

func PyRun_AnyFile(filename string) (int, error)

PyRun_AnyFile : "error" will be set if we fail to open "filename".

func PySys_ResetWarnOptions

func PySys_ResetWarnOptions()

PySys_ResetWarnOptions :

func PySys_SetArgvEx

func PySys_SetArgvEx(args []string, updatepath bool) error

PySys_SetArgvEx :

func PyUnicode_CopyCharacters

func PyUnicode_CopyCharacters(to, from *PyObject, to_start, from_start, how_many int) int

PyUnicode_CopyCharacters :

func PyUnicode_Fill

func PyUnicode_Fill(unicode *PyObject, start, length int, fill_char rune) int

PyUnicode_Fill :

func PyUnicode_GetLength

func PyUnicode_GetLength(unicode *PyObject) int

PyUnicode_GetLength :

func PyUnicode_ReadChar

func PyUnicode_ReadChar(unicode *PyObject, index int) rune

PyUnicode_ReadChar :

func PyUnicode_WriteChar

func PyUnicode_WriteChar(unicode *PyObject, index int, character rune) int

PyUnicode_WriteChar :

func Py_EnterRecursiveCall

func Py_EnterRecursiveCall(where string) int

Py_EnterRecursiveCall :

func Py_GetProgramFullPath

func Py_GetProgramFullPath() (string, error)

Py_GetProgramFullPath :

func Py_InitializeEx

func Py_InitializeEx(initsigs bool)

Py_InitializeEx :

func Py_Main

func Py_Main(args []string) (int, error)

Py_Main : "error" will be set if we fail to call "Py_DecodeLocale" on every "args".

func Py_SetStandardStreamEncoding

func Py_SetStandardStreamEncoding(encoding, errors string) int

Py_SetStandardStreamEncoding :


type PyGILState

type PyGILState C.PyGILState_STATE

PyGILState is an opaque “handle” to the thread state when PyGILState_Ensure() was called, and must be passed to PyGILState_Release() to ensure Python is left in the same state

type PyObject

type PyObject C.PyObject

PyObject :

func PyByteArray_FromStringAndSize

func PyByteArray_FromStringAndSize(str string) *PyObject

PyByteArray_FromStringAndSize :

func PyBytes_Concat

func PyBytes_Concat(bytes, newpart *PyObject) *PyObject

PyBytes_Concat :

func PyBytes_ConcatAndDel

func PyBytes_ConcatAndDel(bytes, newpart *PyObject) *PyObject

PyBytes_ConcatAndDel :

func PyComplex_FromDoubles

func PyComplex_FromDoubles(real, imag float64) *PyObject

PyComplex_FromDoubles :

func PyDict_GetItemWithError

func PyDict_GetItemWithError(p, key *PyObject) *PyObject

PyDict_GetItemWithError :

func PyDict_SetDefault

func PyDict_SetDefault(p, key, pyDefault *PyObject) *PyObject

PyDict_SetDefault :

func PyErr_NewException

func PyErr_NewException(name string, base, dict *PyObject) *PyObject

PyErr_NewException :

func PyErr_NewExceptionWithDoc

func PyErr_NewExceptionWithDoc(name, doc string, base, dict *PyObject) *PyObject

PyErr_NewExceptionWithDoc :

func PyErr_SetImportError

func PyErr_SetImportError(msg, name, path *PyObject) *PyObject

PyErr_SetImportError :

func PyErr_SetImportErrorSubclass

func PyErr_SetImportErrorSubclass(msg, name, path, subclass *PyObject) *PyObject

PyErr_SetImportErrorSubclass :

func PyImport_AddModuleObject

func PyImport_AddModuleObject(name *PyObject) *PyObject

PyImport_AddModuleObject :

func PyImport_ExecCodeModule

func PyImport_ExecCodeModule(name string, co *PyObject) *PyObject

PyImport_ExecCodeModule :

func PyImport_ExecCodeModuleEx

func PyImport_ExecCodeModuleEx(name string, co *PyObject, pathname string) *PyObject

PyImport_ExecCodeModuleEx :

func PyImport_ExecCodeModuleObject

func PyImport_ExecCodeModuleObject(name, co, pathname, cpathname *PyObject) *PyObject

PyImport_ExecCodeModuleObject :

func PyImport_ExecCodeModuleWithPathnames

func PyImport_ExecCodeModuleWithPathnames(name string, co *PyObject, pathname string, cpathname string) *PyObject

PyImport_ExecCodeModuleWithPathnames :

func PyImport_ImportModuleEx

func PyImport_ImportModuleEx(name string, globals, locals, fromlist *PyObject) *PyObject

PyImport_ImportModuleEx :

func PyImport_ImportModuleLevel

func PyImport_ImportModuleLevel(name string, globals, locals, fromlist *PyObject, level int) *PyObject

PyImport_ImportModuleLevel :

func PyImport_ImportModuleLevelObject

func PyImport_ImportModuleLevelObject(name, globals, locals, fromlist *PyObject, level int) *PyObject

PyImport_ImportModuleLevelObject :

func PyList_GetSlice

func PyList_GetSlice(p *PyObject, low, high int) *PyObject

PyList_GetSlice :

func PyLong_FromGoFloat64

func PyLong_FromGoFloat64(v float64) *PyObject

PyLong_FromGoFloat64 ensures the go integer type does not overflow

func PyLong_FromGoInt

func PyLong_FromGoInt(v int) *PyObject

PyLong_FromGoInt ensures the go integer type does not overflow

func PyLong_FromGoInt64

func PyLong_FromGoInt64(v int64) *PyObject

PyLong_FromGoInt64 ensures the go integer type does not overflow

func PyLong_FromGoUint

func PyLong_FromGoUint(v uint) *PyObject

PyLong_FromGoUint ensures the go integer type does not overflow

func PyLong_FromGoUint64

func PyLong_FromGoUint64(v uint64) *PyObject

PyLong_FromGoUint64 ensures the go integer type does not overflow

func PyLong_FromString

func PyLong_FromString(str string, base int) *PyObject

PyLong_FromString :

func PyLong_FromUnicodeObject

func PyLong_FromUnicodeObject(u *PyObject, base int) *PyObject

PyLong_FromUnicodeObject :

func PyLong_FromUnsignedLong

func PyLong_FromUnsignedLong(v uint) *PyObject

PyLong_FromUnsignedLong :

func PyLong_FromUnsignedLongLong

func PyLong_FromUnsignedLongLong(v uint64) *PyObject

PyLong_FromUnsignedLongLong :

func PyModule_GetFilenameObject

func PyModule_GetFilenameObject(module *PyObject) *PyObject

PyModule_GetFilenameObject :

func PyModule_GetNameObject

func PyModule_GetNameObject(module *PyObject) *PyObject

PyModule_GetNameObject :

func PyTuple_GetSlice

func PyTuple_GetSlice(p *PyObject, low, high int) *PyObject

PyTuple_GetSlice :

func PyUnicode_FromEncodedObject

func PyUnicode_FromEncodedObject(obj *PyObject, encoding, errors string) *PyObject

PyUnicode_FromEncodedObject :

func PyUnicode_New

func PyUnicode_New(size int, maxchar rune) *PyObject

PyUnicode_New :

func PyUnicode_Substring

func PyUnicode_Substring(unicode *PyObject, start, end int) *PyObject

PyUnicode_Substring :

func (*PyObject) ASCII

func (pyObject *PyObject) ASCII() *PyObject


func (*PyObject) Bytes

func (pyObject *PyObject) Bytes() *PyObject

Bytes :

func (*PyObject) Call

func (pyObject *PyObject) Call(args *PyObject, kwargs *PyObject) *PyObject

Call :

func (*PyObject) CallFunctionObjArgs

func (pyObject *PyObject) CallFunctionObjArgs(args ...*PyObject) *PyObject

CallFunctionObjArgs :

func (*PyObject) CallMethodArgs

func (pyObject *PyObject) CallMethodArgs(name string, args ...*PyObject) *PyObject

CallMethodArgs : same as CallMethodObjArgs but with name as go string

func (*PyObject) CallMethodObjArgs

func (pyObject *PyObject) CallMethodObjArgs(name *PyObject, args ...*PyObject) *PyObject

CallMethodObjArgs :

func (*PyObject) CallObject

func (pyObject *PyObject) CallObject(args *PyObject) *PyObject

CallObject :

func (*PyObject) DecRef

func (pyObject *PyObject) DecRef()

DecRef :

func (*PyObject) DelAttr

func (pyObject *PyObject) DelAttr(attr_name *PyObject) int

DelAttr :

func (*PyObject) DelAttrString

func (pyObject *PyObject) DelAttrString(attr_name string) int

DelAttrString :

func (*PyObject) DelItem

func (pyObject *PyObject) DelItem(key *PyObject) int

DelItem :

func (*PyObject) Dir

func (pyObject *PyObject) Dir() *PyObject

Dir :

func (*PyObject) GetAttr

func (pyObject *PyObject) GetAttr(attr_name *PyObject) *PyObject

GetAttr :

func (*PyObject) GetAttrString

func (pyObject *PyObject) GetAttrString(attr_name string) *PyObject

GetAttrString :

func (*PyObject) GetItem

func (pyObject *PyObject) GetItem(key *PyObject) *PyObject

GetItem :

func (*PyObject) GetIter

func (pyObject *PyObject) GetIter() *PyObject

GetIter :

func (*PyObject) HasAttr

func (pyObject *PyObject) HasAttr(attr_name *PyObject) bool

HasAttr :

func (*PyObject) HasAttrString

func (pyObject *PyObject) HasAttrString(attr_name string) bool

HasAttrString :

func (*PyObject) Hash

func (pyObject *PyObject) Hash() int

Hash :

func (*PyObject) HashNotImplemented

func (pyObject *PyObject) HashNotImplemented() int

HashNotImplemented :

func (*PyObject) IncRef

func (pyObject *PyObject) IncRef()

IncRef :

func (*PyObject) IsInstance

func (pyObject *PyObject) IsInstance(cls *PyObject) int

IsInstance :

func (*PyObject) IsSubclass

func (pyObject *PyObject) IsSubclass(cls *PyObject) int

IsSubclass :

func (*PyObject) IsTrue

func (pyObject *PyObject) IsTrue() int

IsTrue :

func (*PyObject) Length

func (pyObject *PyObject) Length() int

Length :

func (*PyObject) LengthHint

func (pyObject *PyObject) LengthHint(pyDefault int) int

LengthHint :

func (*PyObject) Not

func (pyObject *PyObject) Not() int

Not :

func (*PyObject) Repr

func (pyObject *PyObject) Repr() *PyObject

Repr :

func (*PyObject) ReprEnter

func (pyObject *PyObject) ReprEnter() int

ReprEnter :

func (*PyObject) ReprLeave

func (pyObject *PyObject) ReprLeave()

ReprLeave :

func (*PyObject) RichCompare

func (pyObject *PyObject) RichCompare(o *PyObject, opid int) *PyObject

RichCompare :

func (*PyObject) RichCompareBool

func (pyObject *PyObject) RichCompareBool(o *PyObject, opid int) int

RichCompareBool :

func (*PyObject) SetAttr

func (pyObject *PyObject) SetAttr(attr_name *PyObject, v *PyObject) int

SetAttr :

func (*PyObject) SetAttrString

func (pyObject *PyObject) SetAttrString(attr_name string, v *PyObject) int

SetAttrString :

func (*PyObject) SetItem

func (pyObject *PyObject) SetItem(key, v *PyObject) int

SetItem :

func (*PyObject) Str

func (pyObject *PyObject) Str() *PyObject

Str :

func (*PyObject) Type

func (pyObject *PyObject) Type() *PyObject

Type :


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL