For a game I am making, I want to create an object that has attributes that can be set to attributes of another object (e.g. door.locked = lock.locked). When I update the attribute of the second object (in this case `lock`), the corresponding attribute of the first object (`door`) should also update. That way unlocking the lock will also unlock the door.
I currently have this implemented with dictionaries, something like this:

```
class Lock():
    def __init___(self, locked = True):
        self.attributes = {'locked': locked}

    def toggleLock():
        self.attributes.update({'locked': not self.attributes['locked']})

class Door():
    def __init__(self, locked = False):
        self.attributes = {'locked': locked}

```

Then I should be able to do this:

```
>>>lock1 = Lock(locked = True)
>>>door1 = Door(locked = lock1.attributes['locked'])
>>>
>>>lock1.attributes['locked']
True
>>>door1.attributes['locked']
True
>>>
>>>lock1.toggleLock()
>>>lock1.attributes['locked']
False
>>>door1.attributes['locked']
False

```

However, when I call the `toggleLock()` method, the lock's status changes but the door's doesn't. A dictionary is mutable, so shouldn't `door1`'s dictionary update when `lock1`'s does?  

How would I implement it so that it does?