pymel.util.arguments.mergeCascadingDicts

mergeCascadingDicts(from_dict, to_dict, allowDictToListMerging=False, allowNewListMembers=False)

recursively update to_dict with values from from_dict.

if any entries in ‘from_dict’ are instances of the class RemovedKey, then the key containing that value will be removed from to_dict

if allowDictToListMerging is True, then if to_dict contains a list, from_dict can contain a dictionary with int keys which can be used to sparsely update the list.

if allowNewListMembers is True, and allowDictToListMerging is also True, then if merging an index into a list that currently isn’t long enough to contain that index, then the list will be extended to be long enough (with None inserted in any intermediate indices)

Note: if using RemovedKey objects and allowDictToList merging, then only indices greater than all of any indices updated / added should be removed, because the order in which items are updated / removed is indeterminate.

Previous topic

pymel.util.arguments.listForNone

Next topic

pymel.util.arguments.pairIter

Core

Core Modules

Other Modules

This Page