mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-43723: Deprecate camelCase aliases from threading (GH-25174)
The snake_case names have existed since Python 2.6, so there is no reason to keep the old camelCase names around. One similar method, threading.Thread.isAlive, was already removed in Python 3.9 (bpo-37804).
This commit is contained in:
parent
cc2ffcdfd7
commit
9825bdfbd5
7 changed files with 159 additions and 20 deletions
|
@ -319,11 +319,11 @@ Here's a trivial example::
|
|||
try:
|
||||
arg = q.get(block=False)
|
||||
except queue.Empty:
|
||||
print('Worker', threading.currentThread(), end=' ')
|
||||
print('Worker', threading.current_thread(), end=' ')
|
||||
print('queue empty')
|
||||
break
|
||||
else:
|
||||
print('Worker', threading.currentThread(), end=' ')
|
||||
print('Worker', threading.current_thread(), end=' ')
|
||||
print('running with argument', arg)
|
||||
time.sleep(0.5)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue