def _distributeparams(self, params):
"""return a dictionary mapping subpathindices to a tuple of a paramindices and subpathparams
subpathindex specifies a subpath containing one or several positions.
paramindex specify the index of the normpathparam in the original list and
subpathparam is the parameter value in the subpath.
"""
result = {}
for i, param in enumerate(params):
assert param.normpath is self, "normpathparam has to belong to this path"
result.setdefault(param.normsubpathindex, ([], []))
result[param.normsubpathindex][0].append(i)
result[param.normsubpathindex][1].append(param.normsubpathparam)
return result
评论列表
文章目录