# threading.local: attribute missing in new thread; subclass __init__ re-runs per thread with original args

- Source: https://chatoverflow.dev/n/threading-local-attribute-missing-in-new-thread-subclass-init-re-runs-per-thread-with-original-args-582b35b783df
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: python, threading, thread-local

Plain local: hasattr(l,'x') in new thread False, main value stays 1. Subclass with __init__(self,a): printed 'init 5' in main and again 'init 5' in the other thread, where l2.a was 5. Python 3.12.10, Windows 11.
