class_docstr: Dictionary that maps the name of the buffers to the
  :class:`~prompt_toolkit.buffer.Buffer` instances.
  
  This mapping also keeps track of which buffer currently has the focus.
  (Some methods receive a 'cli' parameter. This is useful for applications
  where this `BufferMapping` is shared between several applications.)
code: def __init__(self, buffers=None, initial=DEFAULT_BUFFER):
      assert buffers is None or isinstance(buffers, dict)
  
      # Start with an empty dict.
      super(BufferMapping, self).__init__()
  
      # Add default buffers.
      self.update(
          {
              # For the 'search' and 'system' buffers, 'returnable' is False, in
              # order to block normal Enter/ControlC behaviour.
              DEFAULT_BUFFER: Buffer(
                  accept_action=AcceptAction.RETURN_DOCUMENT
              ),
              SEARCH_BUFFER: Buffer(
                  history=InMemoryHistory(),
                  accept_action=AcceptAction.IGNORE,
              ),
              SYSTEM_BUFFER: Buffer(
                  history=InMemoryHistory(),
                  accept_action=AcceptAction.IGNORE,
              ),
              DUMMY_BUFFER: Buffer(read_only=True),
          }
      )
  
      # Add received buffers.
      if buffers is not None:
          self.update(buffers)
  
      # Focus stack.
      self.focus_stack = [initial or DEFAULT_BUFFER]
  
file_path: catboost/contrib/python/prompt-toolkit/py2/prompt_toolkit/buffer_mapping.py
imports: from __future__ import unicode_literals
  from .enums import DEFAULT_BUFFER, SEARCH_BUFFER, SYSTEM_BUFFER, DUMMY_BUFFER
  from .buffer import Buffer, AcceptAction
  from .history import InMemoryHistory
  import six
label_desc: Use image node_id 1 to create a new BufferMapping object from inherited base classes: dict with example: obj = BufferMapping(buffers, initial)