GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — build: use list for mutable retval rather than tuple by Trott · Pull Request #41372 · nodejs/node Conversation
Member
This is a really small semantic Python nit. Pinging @nodejs/python in case I'm just wrong in my understanding or something. We define
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
We define `retval` as a tuple and then replace the tuple by "appending" items with `+=` but that actually creates a new tuple every time. Because it is intended to be mutable, use a list instead, then return a tuple from the function, as it should be immutable outside the function.
Mesteery
reviewed
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.Co-authored-by: Mestery <[email protected]>
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
cclauss
approved these changes
|
Commit Queue failed- Loading data for nodejs/node/pull/41372 ✔ Done loading data for nodejs/node/pull/41372 ----------------------------------- PR info ------------------------------------ Title build: use list for mutable retval rather than tuple (#41372) Author Rich Trott (@Trott) Branch Trott:python-nit -> nodejs:master Labels python, author ready Commits 2 - build: use list for mutable retval rather than tuple - Update configure.py Committers 2 - Rich Trott - GitHub PR-URL: https://github.com/nodejs/node/pull/41372 Reviewed-By: Christian Clauss Reviewed-By: Tobias Nießen ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/41372 Reviewed-By: Christian Clauss Reviewed-By: Tobias Nießen -------------------------------------------------------------------------------- ℹ This PR was created on Sat, 01 Jan 2022 17:10:54 GMT ✔ Approvals: 2 ✔ - Christian Clauss (@cclauss): https://github.com/nodejs/node/pull/41372#pullrequestreview-842349446 ✔ - Tobias Nießen (@tniessen) (TSC): https://github.com/nodejs/node/pull/41372#pullrequestreview-842435129 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2022-01-01T17:24:05Z: https://ci.nodejs.org/job/node-test-pull-request/41718/ - Querying data for job/node-test-pull-request/41718/ ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/master up to date... From https://github.com/nodejs/node * branch master -> FETCH_HEAD ✔ origin/master is now up-to-date - Downloading patch for 41372 From https://github.com/nodejs/node * branch refs/pull/41372/merge -> FETCH_HEAD ✔ Fetched commits as 513e9fd0b611..277dc43511ca -------------------------------------------------------------------------------- [master 30b065eb28] build: use list for mutable retval rather than tuple Author: Rich Trott Date: Sat Jan 1 09:05:03 2022 -0800 1 file changed, 3 insertions(+), 3 deletions(-) [master 2f121192c8] Update configure.py Author: Rich Trott Date: Sat Jan 1 09:23:34 2022 -0800 1 file changed, 1 insertion(+), 1 deletion(-) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. Rebasing (2/4)https://github.com/nodejs/node/actions/runs/1656698573 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in bd92726 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
We define `retval` as a tuple and then replace the tuple by "appending" items with `+=` but that actually creates a new tuple every time. Because it is intended to be mutable, use a list instead, then return a tuple from the function, as it should be immutable outside the function. PR-URL: #41372 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
We define `retval` as a tuple and then replace the tuple by "appending" items with `+=` but that actually creates a new tuple every time. Because it is intended to be mutable, use a list instead, then return a tuple from the function, as it should be immutable outside the function. PR-URL: #41372 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
We define `retval` as a tuple and then replace the tuple by "appending" items with `+=` but that actually creates a new tuple every time. Because it is intended to be mutable, use a list instead, then return a tuple from the function, as it should be immutable outside the function. PR-URL: #41372 Reviewed-By: Christian Clauss <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.