Legend:

1. global mutable data structures (lists and dictionaries, also instances) that are assigned to at module level but whose elements are modified in functions and that are accessed without using the `global` keyword (NOT THREAD-SAFE unless never modified).

22

22

23

"Not thread-safe" has two broad subcategories:

24

* inefficiencies due to calls meant to occur only once occurring more than once (the general `if not foo: initialize foo`, including `memoize` decorator),

25

* errors due to incomplete initialization.

26

27

Incomplete initialization errors can generally be avoided by using full

28

assignment instead of elementwise modification (that's how it is done in the