---

Python4Kids New Tutorial: Weird Binding Stuff

A short tutorial this week on some oddities with the way Python stores and references (“binds to”) data. You might remember, a long time ago, we talked about how, when we store data in a variable, it’s like putting your stuff in a bucket so that you can access it later. Variables in Python actually turn out to be references to objects. A side effect of this is that, in some cases, Python doesn’t work out how you think it will – typically this is where your object is a list or dictionary (actually any object, but you only notice this effect with compound objects) that you think you have copied, but you actually haven’t.