cocopp.toolsdivers.AlgorithmList(list) class documentationcocopp.toolsdivers
(View In Hierarchy)
Not in use. Not necessary when the algorithm dict is an OrderedDict anyway.
A list representing the algorithm name arguments in original order.
The method ordered_dict allows to transform an algorithm dict into an
OrderedDict using the order in self.
>>> from cocopp.toolsdivers import AlgorithmList >>> l = ['b', 'a', 'c'] >>> al = AlgorithmList(l) >>> d = dict(zip(l[-1::-1], [1, 2, 3])) >>> for i, name in enumerate(al.ordered_dict(d)): ... assert name == l[i]
| Method | ordered_dict | return algorithms_dict as OrderedDict in order of self. |
return algorithms_dict as OrderedDict in order of self.
Keys that are not in self are sorted using sorted.