bundles / IPython latest / IPython / core / history / HistoryAccessor / get_tail
function
IPython.core.history:HistoryAccessor.get_tail
source: /IPython/core/history.py:541
Signature
def get_tail(self, n: int = 10, raw: bool = True, output: bool = False, include_latest: bool = False) → Iterable[tuple[int, int, InOrInOut]]Summary
Get the last n lines from the history database.
Parameters
n: intThe number of lines to get
raw, output: boolSee get_range
include_latest: boolIf False (default), n+1 lines are fetched, and the latest one is discarded. This is intended to be used where the function is called by a user command, which it should not return.
Returns
: Tuples as :meth:`get_range`
Aliases
IPython.core.history.HistoryAccessor.get_tail