MCPcopy Index your code
hub / github.com/python/cpython / select_item

Method select_item

Lib/_pyrepl/historical_reader.py:273–282  ·  view source on GitHub ↗
(self, i: int)

Source from the content-addressed store, hash-verified

271 )
272
273 def select_item(self, i: int) -> None:
274 self.transient_history[self.historyi] = self.get_unicode()
275 buf = self.transient_history.get(i)
276 if buf is None:
277 buf = self.history[i].rstrip()
278 self.buffer = list(buf)
279 self.historyi = i
280 self.pos = len(self.buffer)
281 self.dirty = True
282 self.last_refresh_cache.invalidated = True
283
284 def get_item(self, i: int) -> str:
285 if i != len(self.history):

Callers 9

search_nextMethod · 0.95
isearch_nextMethod · 0.95
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45
doMethod · 0.45

Calls 4

listClass · 0.85
get_unicodeMethod · 0.80
getMethod · 0.45
rstripMethod · 0.45

Tested by

no test coverage detected