so... still stateful :).

The problem here is that this value is mutable from separate threads, and because logic units are basically singletons, you introduce bugs under high concurrency (apache modwsgi).

Your solution must ensure 1) values are limited only to a thread; 2) they are cleared after each execution...

Read the python threading documentation, and we can discuss this tomorrow.