test: fix default value for additional param by thefourtheye · Pull Request #2553 · nodejs/node
In Python, the default values of parameters are evaluated only once during their declaration. So, whenever the default parameter is used the same object will be used. Since we use a list, which is a mutable object, this could lead to unexpected results.
thefourtheye added a commit that referenced this pull request
Sep 15, 2015In Python, the default values of parameters are evaluated only once during their declaration. So, whenever the default parameter is used the same object will be used. Since we use a list, which is a mutable object, this could lead to unexpected results. PR-URL: #2553 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
thefourtheye added a commit that referenced this pull request
Sep 15, 2015In Python, the default values of parameters are evaluated only once during their declaration. So, whenever the default parameter is used the same object will be used. Since we use a list, which is a mutable object, this could lead to unexpected results. PR-URL: #2553 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
rvagg
mentioned this pull request
erdun
mentioned this pull request
s4sc
mentioned this pull request
This was referenced
Sep 26, 2022
s4sc
mentioned this pull request
This file contains hidden or 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