Legend:

As a matter of style, the read-only ones should really be tuples, not lists -- the 'say what you mean' idiom: if it shouldn't be modified, don't let it be by making it a tuple. Tuples are also marginally more efficient speed- and space-wise. There is a slight semantic distinction between lists and tuples though http://jtauber.com/blog/2006/04/15/python_tuples_are_not_just_constant_lists/ . But as there are no constant lists in Python, tuples are the only way to be const-correct.

247

248

== Class attributes ==

249

250

Class attributes are shared between instances and thus between threads as well

251

(as module-level classes are just global class objects).

252

253

The behaviour is similar to globals: in similar manner to the global keyword in

1. class variables that are assigned to when the class is defined and never modified later (THREAD-SAFE),

274

1. mutable class level data structures (lists and dictionaries, also instances) that are assigned to when the class is defined but whose elements are modified in methods and that are accessed without using the `__class__` keyword (NOT THREAD-SAFE),

275

1. class variables assigned to in methods by using the `__class__` keyword (NOT THREAD-SAFE),