MCPcopy Index your code
hub / github.com/python/cpython / __repr__

Method __repr__

Lib/asyncio/locks.py:373–378  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

371 self._value = value
372
373 def __repr__(self):
374 res = super().__repr__()
375 extra = 'locked' if self.locked() else f'unlocked, value:{self._value}'
376 if self._waiters:
377 extra = f'{extra}, waiters:{len(self._waiters)}'
378 return f'<{res[1:-1]} [{extra}]>'
379
380 def locked(self):
381 """Returns True if semaphore cannot be acquired immediately."""

Callers

nothing calls this directly

Calls 3

lockedMethod · 0.95
superClass · 0.85
__repr__Method · 0.45

Tested by

no test coverage detected