MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __repr__

Method __repr__

tools/python-3.11.9-amd64/Lib/asyncio/locks.py:352–357  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

350 self._value = value
351
352 def __repr__(self):
353 res = super().__repr__()
354 extra = 'locked' if self.locked() else f'unlocked, value:{self._value}'
355 if self._waiters:
356 extra = f'{extra}, waiters:{len(self._waiters)}'
357 return f'<{res[1:-1]} [{extra}]>'
358
359 def locked(self):
360 """Returns True if semaphore cannot be acquired immediately."""

Callers

nothing calls this directly

Calls 2

lockedMethod · 0.95
__repr__Method · 0.45

Tested by

no test coverage detected