Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dict ¶
type Dict interface { // Clear empties an existing dictionay of all key-value pairs. Clear() // Contains determines whether a dictionary contains the key k Contains(k Object) bool // SetItem inserts the value v into the dictionary with a key k SetItem(k, v Object) error // DelItem removes the entry with key k from the dictionary DelItem(k Object) error // GetItem returns the object with key from the dictionary GetItem(k Object) (Object, error) // Items returns all the items from the dictionary Items() [][2]Object // Keys returns all the keys from the dictionary Keys() []Object // Values returns all the values from the dictionary Values() []Object // Size returns the number of items in the dictionary Size() int }
Dict represents the python dict-like protocol
type Object ¶
type Object interface { // Increment the reference count. // The Object may be nil, in which case the function has no effect. IncRef() // Decrement the reference count. // If the Object is nil, nothing happens. DecRef() // HasAttr returns whether this object has an attribute with name 'n' HasAttr(n string) bool // GetAttr returns the attribute with name 'n' GetAttr(n string) (Object, error) // SetAttr sets the value of the attribute named 'n' of the object to the value 'v' SetAttr(n string, v Object) error // DelAttr deletes the attribute named 'n' of the object DelAttr(n string) error String() string // Call calls a callable Object with args as arguments Call(args ...Object) (Object, error) // Hash computes and returns the hash value of an Object // On failure, Hash returns -1. Hash() int64 // Type returns the Type of this Object. Type() Object }
Object represents any Python object and codifies the Python object protocol.
Click to show internal directories.
Click to hide internal directories.