You are viewing an older version (9.11.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.11.0 / IPython / core / history / HistoryManager / get_tail

function

IPython.core.history:HistoryManager.get_tail

source: /IPython/core/history.py :840

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 : 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.HistoryManager.get_tail