Kris Schnee wrote:
But is there a better way to make it clear I want the value, not an actual reference?
Not really. If you want a copy of something, you need to write code to create a copy, one way or another. If you know the data type of the thing you're copying, there are a variety of ways of writing the code, e.g. for lists you can write y = list(x) or y = x[:]. But you need to write code of some sort. As you gain experience with Python, you'll find that you don't need to copy things anywhere near as often as you might think, so this is not a burden in practice. -- Greg
