This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
1 changed file
with
18 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters