I have a list of objects called TerrainTile.
Each of these instances have a list called resourceList.
resourceList = []
I append an object called obj to this list within this method:
def add_resource_object (self, obj):
self.resourceList.append(obj)
return
For some reason, instead of each individual instance having its own list called resourceList, it seems all instances are sharing the same resourceList list and when it is appended to all instances are appended to.
Why is the .append() appending to all instances of TerrainTile?