| commit | 5e20b4cd17c6627f93e2618f369e62228a38367e | [log] [tgz] |
|---|---|---|
| author | Tom Tromey <tromey@adacore.com> | Fri May 12 08:28:28 2023 -0600 |
| committer | Tom Tromey <tromey@adacore.com> | Mon Jun 12 12:09:28 2023 -0600 |
| tree | 5805aa4425de7b510294124eb0046eadea427ea6 | |
| parent | 5c7cdc95aaace0f2eb7a13199a3cbf479617a009 [diff] |
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.