This is a development version (latest) and may be unstable. Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython latest / IPython / core / history / HistoryAccessor / get_tail

function

IPython.core.history:HistoryAccessor.get_tail

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

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