MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / __repr__

Method __repr__

pymongo/_asyncio_lock.py:99–104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

97 self._locked = False
98
99 def __repr__(self) -> str:
100 res = super().__repr__()
101 extra = "locked" if self._locked else "unlocked"
102 if self._waiters:
103 extra = f"{extra}, waiters:{len(self._waiters)}"
104 return f"<{res[1:-1]} [{extra}]>"
105
106 def locked(self) -> bool:
107 """Return True if lock is acquired."""

Callers 3

__str__Method · 0.45
_redactMethod · 0.45
__repr__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected