MCPcopy Create free account
hub / github.com/goplus/py / Slice

Method Slice

tuple.go:112–123  ·  view source on GitHub ↗

_PyTuple_Resize PyTuple_ClearFreeList()

()

Source from the content-addressed store, hash-verified

110// PyTuple_ClearFreeList()
111
112func (t *Tuple) Slice() []*Base {
113 l := t.Size()
114 s := make([]*Base, l)
115 for i := 0; i < l; i++ {
116 o, err := t.GetItem(i)
117 if err != nil {
118 panic(err)
119 }
120 s[i] = o
121 }
122 return s
123}
124

Callers

nothing calls this directly

Calls 2

SizeMethod · 0.95
GetItemMethod · 0.95

Tested by

no test coverage detected