Mutable Constants

Mutable globals that look like immutable constants (e.g. following ALL_CAPS naming convention) can lead to hard-to-find bugs. If possible, it’s better to use an immutable global instead.

Alternatives:

Before

After

list

tuple

set

frozenset

dict

frozendict

See also: PEP 603; PEP 416