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

Method __getstate__

lib/sqlalchemy/sql/elements.py:2190–2199  ·  view source on GitHub ↗

execute a deferred value for serialization purposes.

(self)

Source from the content-addressed store, hash-verified

2188 )
2189
2190 def __getstate__(self):
2191 """execute a deferred value for serialization purposes."""
2192
2193 d = self.__dict__.copy()
2194 v = self.value
2195 if self.callable:
2196 v = self.callable()
2197 d["callable"] = None
2198 d["value"] = v
2199 return d
2200
2201 def __setstate__(self, state):
2202 if state.get("unique", False):

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected