bundles / IPython 9.3.0 / IPython / core / history / HistoryManager / get_tail
function
IPython.core.history:HistoryManager.get_tail
source: /IPython/core/history.py:811
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.
Extended Summary
Most recent entry last.
Completion will be reordered so that that the last ones are when possible from current session.
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.HistoryManager.get_tail