MCPcopy Index your code
hub / github.com/aws/aws-cli / find_last_write

Method find_last_write

awscli/bcdoc/restdoc.py:70–78  ·  view source on GitHub ↗

Returns the index of the last occurrence of the content argument in the stack, or returns None if content is not on the stack.

(self, content)

Source from the content-addressed store, hash-verified

68 self._writes.append(s)
69
70 def find_last_write(self, content):
71 """
72 Returns the index of the last occurrence of the content argument
73 in the stack, or returns None if content is not on the stack.
74 """
75 try:
76 return len(self._writes) - self._writes[::-1].index(content) - 1
77 except ValueError:
78 return None
79
80 def insert_write(self, index, content):
81 """

Calls

no outgoing calls