MCPcopy
hub / github.com/ormar-orm/ormar / append

Method append

ormar/relations/relation_proxy.py:91–100  ·  view source on GitHub ↗

Appends an item to the list in place :param item: The generic item of the list :type item: T

(self, item: "T")

Source from the content-addressed store, hash-verified

89 return super().__getitem__(item)
90
91 def append(self, item: "T") -> None:
92 """
93 Appends an item to the list in place
94
95 :param item: The generic item of the list
96 :type item: T
97 """
98 idx = len(self)
99 self._relation_cache[item.__hash__()] = idx
100 super().append(item)
101
102 def update_cache(self, prev_hash: int, new_hash: int) -> None:
103 """

Calls 1

__hash__Method · 0.45