Last Updated: February 25, 2016
·
606
· lukasz-madon

Go slices trap for python programmers

I'm a python dev learning Go. Here is one subtle difference between python lists and Go slices. Following statment:

b = x[:]

Makes deep copy of list in python, but in Go it's shallow copy.