人を保持する dict を考えてみましょう:
person = {}
person['name'] = 'Jeff Atwood'
person['address'] = {}
person['address']['street'] = 'Main Street'
person['address']['zip'] = '12345'
person['address']['city'] = 'Miami'
ディクショナリ内の場所へのパスは、値に書き込むためにどのように保存されますか?
# Set city (Existing field)
city_field = ['address', 'city']
person[city_field] = 'London' // Obviously won't work!
# Set country (New field)
country_field = ['address', 'country']
person[city_country] = 'UK' // Obviously won't work!
読み取り用の辞書値へのパスを保存する方法を以前に尋ねたことに注意してください。