class_docstr: Base class for shelf implementations.
  
  This is initialized with a dictionary-like object.
  See the module's __doc__ string for an overview of the interface.
class_docstr_tok: ["Base","class","for","shelf","implementations",".","This","is","initialized","with","a","dictionary-like","object",".","See","the","module","'s","__doc__","string","for","an","overview","of","the","interface","."]
code: def __init__(
      self, dict, protocol=None, writeback=False, keyencoding="utf-8"
  ):
      self.dict = dict
      if protocol is None:
          protocol = DEFAULT_PROTOCOL
      self._protocol = protocol
      self.writeback = writeback
      self.cache = {}
      self.keyencoding = keyencoding
  
imports: from pickle import DEFAULT_PROTOCOL, Pickler, Unpickler
  from io import BytesIO
  import collections.abc
label_desc: Use image node_id 1 to create a new Shelf object from inherited base classes: collections.abc with example: obj = Shelf(dict, protocol, writeback, keyencoding)