Implement a dictionary-like class Bundle, which enables attribute-like access to its elements. So, for example, instead of
>>> bundle['key1'] = 'hello'
you can also do
>>> bundle.key1 = 'hello'
The same is true for reading access:
>>> bundle.key1
hello
Another extension is the method intersection(), which is the equivalent to the method of the set type with the same name.
In contrast to conventional dictionaries, keys must be strings.
Dictionary-like data structure (actually wraps a dictionary, and provides a dictionary-like interface), but with the following changes:
Return intersection of the given bundles, containing only key-value pairs that are equal in all of the bundles.
To be clear: Both key AND value have to agree among all of the input bundles, otherwise a key-value pair does not appear in the output bundle.