[Zope3-checkins] SVN: Zope3/trunk/src/zope/thread/__init__.py
Cosmetic fixes.
Gintautas Miliauskas
gintas at pov.lt
Tue Feb 22 06:24:08 EST 2005
Log message for revision 29242:
Cosmetic fixes.
Changed:
U Zope3/trunk/src/zope/thread/__init__.py
-=-
Modified: Zope3/trunk/src/zope/thread/__init__.py
===================================================================
--- Zope3/trunk/src/zope/thread/__init__.py 2005-02-22 11:13:09 UTC (rev 29241)
+++ Zope3/trunk/src/zope/thread/__init__.py 2005-02-22 11:24:08 UTC (rev 29242)
@@ -15,7 +15,7 @@
Thread-local objects support the management of thread-local data.
If you have data that you want to be local to a thread, simply create
-a thread-local object and use it's attributes:
+a thread-local object and use its attributes:
>>> import zope.thread
>>> mydata = zope.thread.local()
@@ -92,7 +92,7 @@
2
an initial color:
-
+
>>> mydata.color
'red'
>>> del mydata.color
@@ -187,9 +187,9 @@
cls.__init__(self, *args, **kw)
else:
object.__setattr__(self, '__dict__', d)
-
+
class local(_localbase):
-
+
def __getattribute__(self, name):
lock = object.__getattribute__(self, '_local__lock')
lock.acquire()
@@ -231,21 +231,21 @@
# if enumerate fails, as it seems to do during
# shutdown, we'll skip cleanup under the assumption
# that there is nothing to clean up
- return
-
+ return
+
for thread in threads:
try:
__dict__ = thread.__dict__
except AttributeError:
# Thread is dying, rest in peace
continue
-
+
if key in __dict__:
try:
del __dict__[key]
- except KeyError:
- pass # didn't have nything in this thread
-
+ except KeyError:
+ pass # didn't have anything in this thread
+
return __del__
__del__ = __del__()
More information about the Zope3-Checkins
mailing list