mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Merged revisions 64125 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r64125 | benjamin.peterson | 2008-06-11 12:27:50 -0500 (Wed, 11 Jun 2008) | 2 lines give the threading API PEP 8 names ........
This commit is contained in:
parent
559e5d7f4d
commit
672b8031a8
20 changed files with 126 additions and 131 deletions
|
@ -161,16 +161,16 @@ class _localbase(object):
|
|||
# __init__ being called, to make sure we don't call it
|
||||
# again ourselves.
|
||||
dict = object.__getattribute__(self, '__dict__')
|
||||
currentThread().__dict__[key] = dict
|
||||
current_thread().__dict__[key] = dict
|
||||
|
||||
return self
|
||||
|
||||
def _patch(self):
|
||||
key = object.__getattribute__(self, '_local__key')
|
||||
d = currentThread().__dict__.get(key)
|
||||
d = current_thread().__dict__.get(key)
|
||||
if d is None:
|
||||
d = {}
|
||||
currentThread().__dict__[key] = d
|
||||
current_thread().__dict__[key] = d
|
||||
object.__setattr__(self, '__dict__', d)
|
||||
|
||||
# we have a new instance dict, so call out __init__ if we have
|
||||
|
@ -237,4 +237,4 @@ class local(_localbase):
|
|||
except KeyError:
|
||||
pass # didn't have anything in this thread
|
||||
|
||||
from threading import currentThread, RLock
|
||||
from threading import current_thread, RLock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue