#using duplicated array in lambda

2 messages · Page 1 of 1 (latest)

earnest condor
#

At (3) you can see I have 3 items in squad.team
At (1) I'm duplicating squad.team so I can do pop_back at (2) without modifying squad.team
However, at (4), the duplicated team has zero items.
🤔
Why does it have zero items? Do duplicated arrays not propagate properly to lambdas?

#

hmmm, this doesn't work either:

    var team = []
    for member in squad.team:
        team.append(member)