aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python-config.py
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-05-12 08:28:28 -0600
committerTom Tromey <tromey@adacore.com>2023-06-12 12:09:28 -0600
commit5e20b4cd17c6627f93e2618f369e62228a38367e (patch)
tree5805aa4425de7b510294124eb0046eadea427ea6 /gdb/python/python-config.py
parent5c7cdc95aaace0f2eb7a13199a3cbf479617a009 (diff)
downloadgdb-5e20b4cd17c6627f93e2618f369e62228a38367e.zip
gdb-5e20b4cd17c6627f93e2618f369e62228a38367e.tar.gz
gdb-5e20b4cd17c6627f93e2618f369e62228a38367e.tar.bz2
Use tuples for default arguments in DAP
My co-worker Kévin taught me that using a mutable object as a default argument in Python is somewhat dangerous, because the object is created a single time (when the function is defined), and so if it is mutated in the body of the function, the changes will stick around. This patch changes the cases like this in DAP to use () rather than [] as the default. This patch is merely preventative, as no bugs like this are in the code.
Diffstat (limited to 'gdb/python/python-config.py')
0 files changed, 0 insertions, 0 deletions