MCPcopy Index your code
hub / github.com/bpython/bpython / previous

Method previous

bpython/repl.py:258–263  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

256 return self.matches[self.index]
257
258 def previous(self) -> str:
259 if self.index <= 0:
260 self.index = len(self.matches)
261 self.index -= 1
262
263 return self.matches[self.index]
264
265 def cur_line(self) -> tuple[int, str]:
266 """Returns a cursor offset and line with the current substitution

Callers 3

tabMethod · 0.80
test_previousMethod · 0.80
on_tabMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_previousMethod · 0.64