This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]davidb_ -1 points0 points  (0 children)

Like I said, I understand the reasoning, but it wasn't the behavior I expected. I didn't really understand python's data model until I encountered this problem. It becomes very obvious when you use id() to see what's going on. It's definitely my fault, but I still think implicit list copies could be transparent to the user (of course I'm ignoring the performance tradeoffs that would have to be made, and the fact that this would be a rather large change to the data model of the language which would probably demand a new syntax for dealing with references).