eta.util.buffer.get_item

get_item(buffer, importance=False)[source]

Get the top item from a buffer without popping it.

Parameters:
  • buffer (list[tuple[float, object]]) –

  • importance (bool, default=False) – If True is given, return the importance as well as the object.

Return type:

object or tuple[float, object]