MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / __repr__

Method __repr__

asyncpg/cursor.py:172–186  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

170 self._portal_name = None
171
172 def __repr__(self):
173 attrs = []
174 if self._exhausted:
175 attrs.append('exhausted')
176 attrs.append('') # to separate from id
177
178 if self.__class__.__module__.startswith('asyncpg.'):
179 mod = 'asyncpg'
180 else:
181 mod = self.__class__.__module__
182
183 return '<{}.{} "{!s:.30}" {}{:#x}>'.format(
184 mod, self.__class__.__name__,
185 self._state.query,
186 ' '.join(attrs), id(self))
187
188 def __del__(self):
189 if self._state is not None:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected