I have a variable that I increment (just say?), And then add to the array. I do it several times in a loop.
I came to python from C and got used to the fact that if I don’t say that I pass an element by reference, I don’t pass it by reference. Now, in python, all the elements of my list are always the same and correspond to this variable.
In the documentation I was digging, I admit that it is bad, the answer should not be deep, but it will be cool if someone answers faster than I get to the bottom.
Part of the code:
array = [] for i in range(3): array.append(Pose) Pose.pos.x += (width * 0.001) At the output, I get an array consisting of 3 identical elements
ZY "Pose" is so necessary, it is not me who is not literate.