MCPcopy Create free account
hub / github.com/python/cpython / __repr__

Method __repr__

Lib/threading.py:154–167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

152 self._count = 0
153
154 def __repr__(self):
155 owner = self._owner
156 try:
157 owner = _active[owner].name
158 except KeyError:
159 pass
160 return "<%s %s.%s object owner=%r count=%d at %s>" % (
161 "locked" if self.locked() else "unlocked",
162 self.__class__.__module__,
163 self.__class__.__qualname__,
164 owner,
165 self._count,
166 hex(id(self))
167 )
168
169 def _at_fork_reinit(self):
170 self._block._at_fork_reinit()

Callers

nothing calls this directly

Calls 2

lockedMethod · 0.95
idFunction · 0.85

Tested by

no test coverage detected