trying to store the values in a nested dictionary in a shelve file with setdefult(). Is there any easy way to do this? The following code seems to make the values immutable, for example, the last line is unable to change the 'price' value to 25.
room_data = shelve.open("data")
room_data.setdefault("key", {"type": "Standard Single", "available": 5, "price": 50, "adults": 1, "children": 0})
room_data["key"]["price"] = 25
I was hoping to get it functioning with shelve then add SQL later but it might be easier to just learn that now. Let me know what you think. Thanks.