Project

Profile

Help

« Previous | Next » 

Revision c428b877

Added by Mihai Ibanescu about 4 years ago

Do not pass a data structure to a function and mutate it.

In python, I find that passing a data structure to a function/class makes me think the function/class has a local copy of it.

In the case of redirect_data, the parent step should "own" the data structure, and child steps should "reach" into the parent to fetch it, instead of using a locally stored reference. Then it's more obvious that it's a "borrowed" data structure and its change should be visible to sibling steps.