Pipeline currently only supports __setitem__. For parameters, it seems natural to have
__delitem__
update
pop
__contains__
However, they clash with __getitem__. And it is unclear to me how most should be implemented with regard to providers.
However, at a minimum, I think we should add update.
And we should make sure that Python's default iterator behaviour raises meaningful errors. Currently, it fails because __getitem__ cannot be called with integers. E.g., list(pipeline) and x in pipeline raise KeyError: "Node '0' does not exist in the graph.".
Pipeline currently only supports
__setitem__. For parameters, it seems natural to have__delitem__updatepop__contains__However, they clash with
__getitem__. And it is unclear to me how most should be implemented with regard to providers.However, at a minimum, I think we should add
update.And we should make sure that Python's default iterator behaviour raises meaningful errors. Currently, it fails because
__getitem__cannot be called with integers. E.g.,list(pipeline)andx in pipelineraiseKeyError: "Node '0' does not exist in the graph.".