hydrac.util.parameters

Parameters class (hydrac.util.parameters)

class hydrac.util.parameters.AttrDict(inpt={})[source]

Bases: dict

AttrDict class. This class transforms any type of data structure to a dictionary with attribute-style access. It maps attribute access to the real dictionary. This class can handle lists of lists, dictionnaries, tuples and ParamContainers from the package hydrac.util.paramcontainer

update(self, *args, **kwargs)[source]

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

Functions

Parameters(dico) Walks a simple data structure, converting dictionary to AttrDict.

Classes

AttrDict([inpt]) AttrDict class.