It's reasonable for someone to want a dictionary merge that throws an exception when there are conflicts, or a set merge that does an intersection instead of a union, or a string merge that merges strings, or a generic iterable merge-to-list, or a generic iterable merge-to-set, etc.
Provide these in some sort of 'extras' struct or package, and maybe provide a few pre-customized Merge classes/functions.
a dictionary merge which throws an exception instead of recursing when keys are found in both dictionaries.
a set merge which performs an intersection instead of a union
a generator merge which uses izip for generators
a "matching" merge which merges to a "best-fit" class (such as merging a default and set to a set, instead of to a tuple, or merging them to a list if the default passed in is not hashable.)
a pedantic merge class which throws errors when there isn't a type definition (instead of setting the type to 'default') or when there isn't a rule (instead of using tuple merge)
It's reasonable for someone to want a dictionary merge that throws an exception when there are conflicts, or a set merge that does an intersection instead of a union, or a string merge that merges strings, or a generic iterable merge-to-list, or a generic iterable merge-to-set, etc.
Provide these in some sort of 'extras' struct or package, and maybe provide a few pre-customized Merge classes/functions.