func sliceAttr(g *GoSlice, name string, methods map[string]builtinSliceMethod) (starlark.Value, error) {
    method := methods[name]
    if method == nil {
        return nil, nil // no such method
    }