MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _reconstitute

Function _reconstitute

lib/sqlalchemy/ext/orderinglist.py:428–440  ·  view source on GitHub ↗

Reconstitute an :class:`.OrderingList`. This is the adjoint to :meth:`.OrderingList.__reduce__`. It is used for unpickling :class:`.OrderingList` objects.

(
    cls: Type[OrderingList[_T]], dict_: Dict[str, Any], items: List[_T]
)

Source from the content-addressed store, hash-verified

426
427
428def _reconstitute(
429 cls: Type[OrderingList[_T]], dict_: Dict[str, Any], items: List[_T]
430) -> OrderingList[_T]:
431 """Reconstitute an :class:`.OrderingList`.
432
433 This is the adjoint to :meth:`.OrderingList.__reduce__`. It is used for
434 unpickling :class:`.OrderingList` objects.
435
436 """
437 obj = cls.__new__(cls)
438 obj.__dict__.update(dict_)
439 list.extend(obj, items)
440 return obj

Callers

nothing calls this directly

Calls 3

__new__Method · 0.45
updateMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected