{ } Raw JSON

bundles / IPython 9.17.0 / IPython / core / history / HistoryAccessor / get_tail

function

IPython.core.history:HistoryAccessor.get_tail

source: /dev/ipython/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 : int

The number of lines to get

raw, output : bool

See get_range

include_latest : bool

If 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