Closed
Description
Bug report
Bug description:
import threading
r = threading.RLock()
print(f"{r = }")
output is:
r = <unlocked _thread.RLock object owner=0 count=1 at 0x105a98720>
The threading.RLock.__repr__
seems to me erronous because when a threading.RLock
is just created, its count
attribute should be 0.
This error occurs only with the _thread
module.
I can submit a PR.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS