Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/goplus/py
/ functions
Functions
233 in github.com/goplus/py
⨍
Functions
233
◇
Types & classes
30
Function
AsFloat
(o *Base)
float.go:25
Function
AsModule
(o *Base)
module.go:59
Function
AsTuple
(o *Base)
tuple.go:32
Function
AsType
(o *Base)
type.go:30
Method
Bytes
Bytes returns a Bytes representation of "obj". This is equivalent to the Python "bytes(obj)". In Python 2.x this method is identical to Str(). Retu
object.go:221
Function
Call
(fn *py.Base, args ...interface{})
pyutil/call.go:46
Method
CallObjArgs
(args ...*Base)
object.go:289
Method
CheckExact
()
tuple.go:68
Method
CheckExact
CheckExact returns true when "t" is an actual Type object, and not some form of subclass.
type.go:69
Method
CheckExact
()
module.go:66
Method
CheckExact
CheckExact returns true if d is an actual dictionary object, and not an instance of a sub type.
dict.go:46
Method
Clear
Clear empties the dictionary d of all key-value pairs.
dict.go:55
Method
Compare
PyObject_Cmp : Thanks to multiple return values, we don't need this function to be available in Go. Compare returns the result of comparing "obj" and
object.go:182
Function
CompileFile
(name string, start StartToken)
code.go:76
Method
Contains
Contains Returns true if the dictionary contains the given key. This is equivalent to the Python expression "key in d".
dict.go:61
Method
Copy
Copy returns a new dictionary that contains the same key-values pairs as d. Return value: New Reference.
dict.go:69
Method
DelAttr
PyObject_GenericSetAttr : This is an internal helper function - we shouldn't need to expose it ... DelAttr deletes the attribute with the name "name"
object.go:145
Method
DelAttrString
DelAttrString deletes the attribute with the name "name" from "obj". This is equivalent to the Python "del obj.name".
object.go:152
Method
DelItem
DelItem deletes the element from "obj" that corresponds to "key". This is equivalent to the Python "del obj[key]".
object.go:338
Method
DelItem
DelItem removes the entry with the key of "key" from the dictionary d. If "key" is not hashable, a TypeError is returned.
dict.go:93
Method
DelItemString
DelItem removes the entry with the key of "key" (or rather, with a *String with the value of "key" as the key) from the dictionary d.
dict.go:100
Method
Dir
PyObject_AsFileDescriptor : TODO
object.go:345
Method
Divide
Divide returns the result of dividing n by obj. The equivalent Python is "n obj". Return value: New Reference.
number.go:51
Method
Divmod
Divmod returns the result of the Python "divmod(n, obj)". Return value: New Reference.
number.go:84
Function
EnterRecursiveCall
EnterRecusiveCall marks a point where a recursive Go-level call is about to be performed. It returns true if the recursive call is permitted, otherwi
python.go:77
Method
ErrV
ErrV returns a new Error of the specified kind, and with the given value.
exception.go:17
Method
Error
Error() returns a string representation of the Python exception represented by the Error e. This is the same as the final line of the Python output f
error.go:46
Method
Filename
()
module.go:86
Method
Float
()
float.go:37
Method
FloorDivide
FloorDivide returns the floor of dividing n obj obj. Return value: New Reference.
number.go:59
Method
Format
(args *Tuple)
string.go:42
Method
GetAttr
GetAttr returns the attribute of "obj" with the name "name". This is equivalent to the Python "obj.name". Return value: New Reference.
object.go:105
Function
GetBuiltins
Return a dictionary of the builtins in the current execution frame, or the interpreter of the thread state if no frame is currently executing. Return
code.go:125
Function
GetException
()
error.go:113
Function
GetGlobals
Return a dictionary of the local variables in the current execution frame, or NULL if no frame is currently executing. Return value: Borrowed referen
code.go:143
Method
GetItem
GetItem returns the element of "obj" corresponding to "key". This is equivalent to the Python "obj[key]". Return value: New Reference.
object.go:324
Function
GetLocals
Return a dictionary of the global variables in the current execution frame, or NULL if no frame is currently executing. Return value: Borrowed refere
code.go:134
Method
GetSlice
(low, high int)
tuple.go:93
Method
HasAttr
HasAttr returns true if "obj" has the attribute "name". This is equivalent to the Python "hasattr(obj, name)".
object.go:81
Method
HasAttrString
HasAttrString returns true if "obj" has the attribute "name". This is equivalent to the Python "hasattr(obj, name)".
object.go:91
Function
Import
(name string)
module.go:22
Method
InPlaceAdd
InPlaceAdd returns the result of adding n and obj. This is done in place if supported by n. The equivalent Python is "n += obj". Return value: New
number.go:177
Method
InPlaceAnd
InPlaceAnd returns the bitwise and of n and obj. This is done in place if supported by n. The equivalent Python is "n &= obj". Return value: New Re
number.go:267
Method
InPlaceDivide
InPlaceDivide returns the result of dividing n by obj. This is done in place if supported by n. The equivalent Python is "n /= obj". Return value:
number.go:204
Method
InPlaceFloorDivide
TODO returns the ... Return value: New Reference.
number.go:212
Method
InPlaceLshift
InPlaceLshift returns the result of left shifting n by obj. This is done in place if supported by n. The equivalent Python is "n <<= obj". Return v
number.go:249
Method
InPlaceMultiply
InPlaceMultiply returns the result of multiplying n by obj. This is done in place if supported by n. The equivalent Python is "n *= obj". Return va
number.go:195
Method
InPlaceOr
InPlaceOr returns the bitwise or of n and obj. This is done in place if supported by n. The equivalent Python is "n |= obj". Return value: New Refe
number.go:285
Method
InPlacePower
InPlacePower returns the result of the Python "pow(n, obj1, obj2)". This is done in place if supported by n. If obj2 is None, then the Python "n **=
number.go:240
Method
InPlaceRemainder
InPlaceRemainder returns the remainder of n divided by obj. This is done in place if supported by n. The equivalent Python is "n %= obj". Return va
number.go:229
Method
InPlaceRshift
InPlaceRshift returns the result of right shifting n by obj. This is done in place if supported by n. The equivalent Python is "n >>= obj". Return
number.go:258
Method
InPlaceSubtract
InPlaceSubtract returns the result of subtracting obj from n. This is done in place if supported by n. The equivalent Python is "n -= obj". Return
number.go:186
Method
InPlaceTrueDivide
TODO returns the ... Return value: New Reference.
number.go:220
Method
InPlaceXor
InPlaceXor returns the bitwise xor of n and obj. This is done in place if supported by n. The equivalent Python is "n ^= obj". Return value: New Re
number.go:276
Method
Init
Init initialises obj. It is equivalent to "obj.__init__(*args, **kw)" in Python.
object.go:38
Method
Init
(obj *Base, args *Tuple, kw *Dict)
type.go:59
Function
InitializeEx
(initsigs bool)
python.go:27
Method
Invert
Invert returns the bitwise negation of n. The equivalent Python is "-n". Return value: New Reference.
number.go:124
Method
IsGc
IsGc returns true if the type "t" supports Cyclic Garbage Collection.
type.go:87
Method
IsInstance
PyObject_Unicode : TODO IsInstance returns true if "obj" is an instance of "cls", false otherwise. If "cls" is a Type instead of a class, then true wi
object.go:233
Method
IsSubclass
Return true if klass is a subclass of base. Return false in all other cases.
class.go:48
Method
IsSubclass
IsSubclass retuns true if "obj" is a Subclass of "cls", false otherwise. If "cls" is a Tuple, then true is returned if "obj" is a Subclass of any mem
object.go:241
Method
IsSubtype
IsSubtype returns true if "t" is a subclass of "t2".
type.go:92
Method
IsTrue
IsTrue returns true if the value of obj is considered to be True. This is equivalent to "if obj:" in Python.
object.go:61
Function
LeaveRecursiveCall
LeaveRecursiveCall must be called after a recursive call that was indicated by EnterRecursiveCall.
python.go:85
Method
Length
PyObject_Hash : TODO PyObject_HashNotImplement : This is an internal function, that we probably don't need to export. Length returns the length of the
object.go:308
Method
Lshift
Lshift returns the result of left shifting n by obj. The equivalent Python is "n << obj". Return value: New Reference.
number.go:133
Function
Main
(args []string)
python.go:59
Method
Map
Map returns a Go map that contains the values from the Python dictionary, indexed by the keys. The keys and values are the same as in the Python dict
dict.go:209
Method
MapString
MapString is similar to Map, except that the keys are first converted to strings. If the keys are not all Python strings, then an error is returned.
dict.go:226
Method
Merge
PyDict_Next Merge merges key values pairs from Object o (which may be a dictionary, or an object that supports "o.keys()" and "o[key]") into the dicti
dict.go:173
Method
MergeFromSeq2
MergeFromSeq2 merges key values pairs from the Object o (which must be an iterable object, where each item is an iterable of length 2 - the key value
dict.go:194
Method
Modified
PyType_ClearCache : TODO - ??? Modified should be called after the attributes or base class of a Type have been changed.
type.go:77
Method
Multiply
Multiply returns the result of multiplying n by obj. The equivalent Python is "n * obj". Return value: New Reference.
number.go:42
Method
Name
Return module‘s __name__ value. If the module does not provide one, or if it is not a string, SystemError is raised and NULL is returned.
module.go:78
Method
Negative
Negative returns the negation of n. The equivalent Python is "-n". Return value: New Reference.
number.go:100
Function
NewDictProxy
(obj *Base)
dict.go:32
Function
NewFloat
(i float64)
float.go:21
Function
NewFloatFromString
(s string)
float.go:32
Function
NewInstance
(typ *py.Class, args ...interface{})
pyutil/call.go:84
Function
NewInt64
(i int64)
int.go:29
Function
NewLong
(i int64)
long.go:21
Function
NewModule
(name string)
module.go:47
Method
NewNoArgs
()
class.go:27
Method
NewNoArgs
()
type.go:37
Method
NewObjArgs
(args ...*Base)
class.go:41
Method
NewObjArgs
(args ...*Base)
type.go:48
Method
Normalize
* // Matches returns true if e.Kind matches the exception in exc. If exc is a // Class, then true is returned if e.Kind is an instance. If exc is a
error.go:69
Method
Not
Not returns true if the value of obj is considered to be False. This is equivalent to "if not obj:" in Python.
object.go:71
Method
Or
Or returns the bitwise or of n and obj. The equivalent Python is "n | obj". Return value: New Reference.
number.go:168
Function
Pack
(args ...interface{})
pyutil/call.go:27
Function
Parse
------------------------------------------------------------------------------------------
goargs.go:129
Method
Positive
Positive returns the positive of n. The equivalent Python is "+n". Return value: New Reference.
number.go:108
Method
Power
Power returns the result of the Python "pow(n, obj1, obj2)". Return value: New Reference.
number.go:92
Method
Py_bar
(args *Tuple)
goregister_test.go:21
Method
Py_bar
(args *Tuple)
gomodule_test.go:13
Method
Py_bar
(args *py.Tuple)
examples/gomodule/gomodule.go:14
Method
Py_bar2
(args *py.Tuple)
examples/gomodule/gomodule.go:25
Method
Py_foo
(args *Tuple)
goregister_test.go:17
Method
Remainder
Remainder returns the remainder of dividing n by obj. The equivalent Python is "n % obj". Return value: New Reference.
number.go:76
← previous
next →
101–200 of 233, ranked by callers