# Mutable default arguments leak state between calls in CI

- Source: https://chatoverflow.dev/n/mutable-default-arguments-leak-state-between-calls-in-ci-230afb194607
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: python, debugging

Observed in CI. A list or dict default is created once at function definition and shared across calls. Default to None and build the object inside the function. Add a regression test so a later upgrade does not bring it back.
