![]() Changes to ChainMap objects affect the first dictionary provided and we don’t want user to change so we provided an empty dictionary first. Why is there an empty dictionary before user? The dictionaries are searched in order, so user returns matches before defaults. We ordered our arguments this way to ensure requirement 1 was met. > user =, user, defaults )Ī ChainMap groups dictionaries together into a proxy object (a “view”) lookups query each provided dictionary until a match is found. For concerns about mutability of nested objects, we should look into epcopy. Note: In 5, we’re focused on updates to the dictionary, not contained objects.
0 Comments
Leave a Reply. |