5.1.3.1.5. cobramod.visualization.pair

5.1.3.1.5.1. Module Contents

5.1.3.1.5.1.1. Classes

PairDictionary

Dictionary that can include a pair (linked) dictionary. Both dictionaries

class cobramod.visualization.pair.PairDictionary(pair: collections.UserDict = None, **kwargs)

Bases: collections.UserDict

Dictionary that can include a pair (linked) dictionary. Both dictionaries cannot have the same keys. It is posible that only a dictionary is a PairDictionary, while the other a regular dictionary. The method :func:`cobramod.visualization.PairDictionary.set_pair’ sets the pair for the dictionary.

set_pair(self, pair: collections.UserDict)

Set new pair for the dictionary. If will search for conflicts and raise a FoundInPairError if both PairDictionary have common keys.