Documentation
¶
Index ¶
- func FetchError() error
- func Finalize()
- func GoString(s *Char) string
- func GoStringN(s *Char, n int) string
- func Initialize()
- func RunMain(args []string) int
- func RunString(code string) error
- func SetTypeError(err error)
- func ToValue(from Object, to reflect.Value) bool
- func With[T Objecter](obj T, fn func(v T)) T
- type Bool
- type Bytes
- type Char
- type Complex
- type Dict
- func (d Dict) Del(key Objecter)
- func (o Dict) Ensure()
- func (d Dict) Get(key Objecter) Object
- func (d Dict) GetString(key string) Object
- func (d Dict) HasKey(key any) bool
- func (d Dict) Items() func(func(Object, Object) bool)
- func (o Dict) Nil() bool
- func (o Dict) RefCount() int
- func (d Dict) Set(key, value Objecter)
- func (d Dict) SetString(key string, value Objecter)
- type Float
- type Func
- type InputType
- type KwArgs
- type List
- type Long
- type Module
- func (m Module) AddMethod(name string, fn any, doc string) Func
- func (m Module) AddObject(name string, obj Object) int
- func (m Module) AddType(obj, init any, name, doc string) Object
- func (m Module) Dict() Dict
- func (o Module) Ensure()
- func (m Module) Name() string
- func (o Module) Nil() bool
- func (o Module) RefCount() int
- type Object
- func (o Object) AsBool() Bool
- func (o Object) AsBytes() Bytes
- func (o Object) AsComplex() Complex
- func (o Object) AsDict() Dict
- func (o Object) AsFloat() Float
- func (o Object) AsFunc() Func
- func (o Object) AsList() List
- func (o Object) AsLong() Long
- func (o Object) AsModule() Module
- func (o Object) AsStr() Str
- func (o Object) AsTuple() Tuple
- func (o Object) Attr(name string) Object
- func (o Object) AttrBool(name string) Bool
- func (o Object) AttrBytes(name string) Bytes
- func (o Object) AttrDict(name string) Dict
- func (o Object) AttrFloat(name string) Float
- func (o Object) AttrFunc(name string) Func
- func (o Object) AttrList(name string) List
- func (o Object) AttrLong(name string) Long
- func (o Object) AttrString(name string) Str
- func (o Object) AttrTuple(name string) Tuple
- func (o Object) Call(name string, args ...any) Object
- func (o Object) Dir() List
- func (o Object) Ensure()
- func (o Object) Equals(other Objecter) bool
- func (o Object) IsBool() bool
- func (o Object) IsBytes() bool
- func (o Object) IsComplex() bool
- func (o Object) IsDict() bool
- func (o Object) IsFloat() bool
- func (o Object) IsFunc() bool
- func (o Object) IsList() bool
- func (o Object) IsLong() bool
- func (o Object) IsStr() bool
- func (o Object) IsTuple() bool
- func (o Object) Nil() bool
- func (o Object) RefCount() int
- func (o Object) Repr() string
- func (o Object) SetAttr(name string, value any)
- func (o Object) String() string
- func (o Object) Type() Object
- type Objecter
- type Str
- type Tuple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize()
func SetTypeError ¶
func SetTypeError(err error)
Types ¶
type Char ¶
func AllocCStrDontFree ¶
type Complex ¶
type Complex struct {
Object
}
func MakeComplex ¶
func MakeComplex(f complex128) Complex
func (Complex) Complex128 ¶
func (c Complex) Complex128() complex128
type Dict ¶
type Dict struct {
Object
}
func DictFromPairs ¶
func GetModuleDict ¶
func GetModuleDict() Dict
type Float ¶
type Float struct {
Object
}
Float represents a Python float object. It provides methods to convert between Go float types and Python float objects, as well as checking numeric properties.
type InputType ¶
const ( SingleInput InputType = C.Py_single_input FileInput InputType = C.Py_file_input EvalInput InputType = C.Py_eval_input )
type Long ¶
type Long struct {
Object
}
func LongFromFloat64 ¶
func LongFromString ¶
func LongFromUintptr ¶
func LongFromUnicode ¶
type Module ¶
type Module struct {
Object
}
func CreateModule ¶
func ImportModule ¶
func MainModule ¶
func MainModule() Module
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func (Object) AttrString ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.