Delete a broken threading.local example (GH-5870)
This code never did anything correct or useful. The class attribute will never be affected, and the condition will never be true.
(cherry picked from commit 5fb632e83136399bad9427ee23ec8b771695290a)
Co-authored-by: Aaron Gallagher <habnabit@users.noreply.github.com>
diff --git a/Lib/_threading_local.py b/Lib/_threading_local.py
index 09a3515..1480329 100644
--- a/Lib/_threading_local.py
+++ b/Lib/_threading_local.py
@@ -57,11 +57,7 @@
>>> class MyLocal(local):
... number = 2
- ... initialized = False
... def __init__(self, **kw):
- ... if self.initialized:
- ... raise SystemError('__init__ called too many times')
- ... self.initialized = True
... self.__dict__.update(kw)
... def squared(self):
... return self.number ** 2
@@ -98,7 +94,7 @@
>>> thread.start()
>>> thread.join()
>>> log
- [[('color', 'red'), ('initialized', True)], 11]
+ [[('color', 'red')], 11]
without affecting this thread's data: