MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / __contains__

Method __contains__

lib/sqlalchemy/engine/result.py:231–237  ·  view source on GitHub ↗
(self, item: Any)

Source from the content-addressed store, hash-verified

229 return iter(self._keys)
230
231 def __contains__(self, item: Any) -> bool:
232 if isinstance(item, int):
233 return False
234
235 # note this also includes special key fallback behaviors
236 # which also don't seem to be tested in test_resultset right now
237 return self._parent._has_key(item)
238
239 def __eq__(self, other: Any) -> bool:
240 return list(other) == list(self)

Callers

nothing calls this directly

Calls 1

_has_keyMethod · 0.45

Tested by

no test coverage detected