Skip to content
This repository has been archived by the owner on Jan 30, 2021. It is now read-only.

Lists inside a list conversion ([[]] to [][]int) #3

Open
hermanTenuki opened this issue Nov 2, 2020 · 1 comment
Open

Lists inside a list conversion ([[]] to [][]int) #3

hermanTenuki opened this issue Nov 2, 2020 · 1 comment

Comments

@hermanTenuki
Copy link
Owner

Python list [[1, 2, 3], [4, 5, 6]] to golang [][]int conversion causes all inner slices being full empty.

list1 = list_to_slice([intGo(i) for i in [1, 2, 3]])
list2 = list_to_slice([intGo(i) for i in [4, 5, 6]])
ls = list_to_slice([list1, list2])
ls_back = slice_to_list(ls)
list1_back = slice_to_list(ls_back[0])

Causes AttributeError: 'sliceGo' object has no attribute 'len'

@hermanTenuki hermanTenuki added the bug Something isn't working label Nov 2, 2020
@hermanTenuki
Copy link
Owner Author

With update #4, slices are hardcoded to work only with intGo, floatGo, stringGo, boolGo. Further rework is needed.

@hermanTenuki hermanTenuki added enhancement New feature or request and removed bug Something isn't working enhancement New feature or request labels Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant