shelve API Reference

Full documentation for shelve (Standard Library / Native)

shelve.BsdDbShelf
Python Library Documentation: class BsdDbShelf in module shelve

class BsdDbShelf(Shelf)
 |  BsdDbShelf(dict, protocol=None, writeback=False, keyencoding='utf-8')
 |
 |  Shelf implementation using the "BSD" db interface.
 |
 |  This adds methods first(), next(), previous(), last() and
 |  set_location() that have no counterpart in [g]dbm databases.
 |
 |  The actual database must be opened using one of the "bsddb"
 |  modules "open" routines (i.e. bsddb.hashopen, bsddb.btopen or
 |  bsddb.rnopen) and passed to the constructor.
 |
 |  See the module's __doc__ string for an overview of the interface.
 |
 |  Method resolution order:
 |      BsdDbShelf
 |      Shelf
 |      collections.abc.MutableMapping
 |      collections.abc.Mapping
 |      collections.abc.Collection
 |      collections.abc.Sized
 |      collections.abc.Iterable
 |      collections.abc.Container
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __init__(self, dict, protocol=None, writeback=False, keyencoding='utf-8')
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  first(self)
 |
 |  last(self)
 |
 |  next(self)
 |
 |  previous(self)
 |
 |  set_location(self, key)
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  __abstractmethods__ = frozenset()
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from Shelf:
 |
 |  __contains__(self, key)
 |
 |  __del__(self)
 |
 |  __delitem__(self, key)
 |
 |  __enter__(self)
 |
 |  __exit__(self, type, value, traceback)
 |
 |  __getitem__(self, key)
 |
 |  __iter__(self)
 |
 |  __len__(self)
 |
 |  __setitem__(self, key, value)
 |
 |  close(self)
 |
 |  get(self, key, default=None)
 |      D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
 |
 |  sync(self)
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from Shelf:
 |
 |  __dict__
 |      dictionary for instance variables
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from collections.abc.MutableMapping:
 |
 |  clear(self)
 |      D.clear() -> None.  Remove all items from D.
 |
 |  pop(self, key, default=<object object at 0x000001B44F9681F0>)
 |      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
 |      If key is not found, d is returned if given, otherwise KeyError is raised.
 |
 |  popitem(self)
 |      D.popitem() -> (k, v), remove and return some (key, value) pair
 |      as a 2-tuple; but raise KeyError if D is empty.
 |
 |  setdefault(self, key, default=None)
 |      D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
 |
 |  update(self, other=(), /, **kwds)
 |      D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
 |      If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
 |      If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
 |      In either case, this is followed by: for k, v in F.items(): D[k] = v
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from collections.abc.Mapping:
 |
 |  __eq__(self, other)
 |      Return self==value.
 |
 |  items(self)
 |      D.items() -> a set-like object providing a view on D's items
 |
 |  keys(self)
 |      D.keys() -> a set-like object providing a view on D's keys
 |
 |  values(self)
 |      D.values() -> an object providing a view on D's values
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes inherited from collections.abc.Mapping:
 |
 |  __hash__ = None
 |
 |  __reversed__ = None
 |
 |  ----------------------------------------------------------------------
 |  Class methods inherited from collections.abc.Collection:
 |
 |  __subclasshook__(C)
 |      Abstract classes can override this to customize issubclass().
 |
 |      This is invoked early on by abc.ABCMeta.__subclasscheck__().
 |      It should return True, False or NotImplemented.  If it returns
 |      NotImplemented, the normal algorithm is used.  Otherwise, it
 |      overrides the normal algorithm (and the outcome is cached).
 |
 |  ----------------------------------------------------------------------
 |  Class methods inherited from collections.abc.Iterable:
 |
 |  __class_getitem__ = GenericAlias(...)
 |      Represent a PEP 585 generic type
 |
 |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
shelve.BytesIO
Python Library Documentation: class BytesIO in module _io

class BytesIO(_BufferedIOBase)
 |  BytesIO(initial_bytes=b'')
 |
 |  Buffered I/O implementation using an in-memory bytes buffer.
 |
 |  Method resolution order:
 |      BytesIO
 |      _BufferedIOBase
 |      _IOBase
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __getstate__(...)
 |      Helper for pickle.
 |
 |  __init__(self, /, *args, **kwargs)
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __iter__(self, /)
 |      Implement iter(self).
 |
 |  __next__(self, /)
 |      Implement next(self).
 |
 |  __setstate__(...)
 |
 |  __sizeof__(...)
 |      Size of object in memory, in bytes.
 |
 |  close(self, /)
 |      Disable all I/O operations.
 |
 |  flush(self, /)
 |      Does nothing.
 |
 |  getbuffer(self, /)
 |      Get a read-write view over the contents of the BytesIO object.
 |
 |  getvalue(self, /)
 |      Retrieve the entire contents of the BytesIO object.
 |
 |  isatty(self, /)
 |      Always returns False.
 |
 |      BytesIO objects are not connected to a TTY-like device.
 |
 |  read(self, size=-1, /)
 |      Read at most size bytes, returned as a bytes object.
 |
 |      If the size argument is negative, read until EOF is reached.
 |      Return an empty bytes object at EOF.
 |
 |  read1(self, size=-1, /)
 |      Read at most size bytes, returned as a bytes object.
 |
 |      If the size argument is negative or omitted, read until EOF is reached.
 |      Return an empty bytes object at EOF.
 |
 |  readable(self, /)
 |      Returns True if the IO object can be read.
 |
 |  readinto(self, buffer, /)
 |      Read bytes into buffer.
 |
 |      Returns number of bytes read (0 for EOF), or None if the object
 |      is set not to block and has no data to read.
 |
 |  readline(self, size=-1, /)
 |      Next line from the file, as a bytes object.
 |
 |      Retain newline.  A non-negative size argument limits the maximum
 |      number of bytes to return (an incomplete line may be returned then).
 |      Return an empty bytes object at EOF.
 |
 |  readlines(self, size=None, /)
 |      List of bytes objects, each a line from the file.
 |
 |      Call readline() repeatedly and return a list of the lines so read.
 |      The optional size argument, if given, is an approximate bound on the
 |      total number of bytes in the lines returned.
 |
 |  seek(self, pos, whence=0, /)
 |      Change stream position.
 |
 |      Seek to byte offset pos relative to position indicated by whence:
 |           0  Start of stream (the default).  pos should be >= 0;
 |           1  Current position - pos may be negative;
 |           2  End of stream - pos usually negative.
 |      Returns the new absolute position.
 |
 |  seekable(self, /)
 |      Returns True if the IO object can be seeked.
 |
 |  tell(self, /)
 |      Current file position, an integer.
 |
 |  truncate(self, size=None, /)
 |      Truncate the file to at most size bytes.
 |
 |      Size defaults to the current file position, as returned by tell().
 |      The current file position is unchanged.  Returns the new size.
 |
 |  writable(self, /)
 |      Returns True if the IO object can be written.
 |
 |  write(self, b, /)
 |      Write bytes to file.
 |
 |      Return the number of bytes written.
 |
 |  writelines(self, lines, /)
 |      Write lines to the file.
 |
 |      Note that newlines are not added.  lines can be any iterable object
 |      producing bytes-like objects. This is equivalent to calling write() for
 |      each element.
 |
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |
 |  __new__(*args, **kwargs)
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |
 |  closed
 |      True if the file is closed.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from _BufferedIOBase:
 |
 |  detach(self, /)
 |      Disconnect this buffer from its underlying raw stream and return it.
 |
 |      After the raw stream has been detached, the buffer is in an unusable
 |      state.
 |
 |  readinto1(self, buffer, /)
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from _IOBase:
 |
 |  __del__(...)
 |
 |  __enter__(...)
 |
 |  __exit__(...)
 |
 |  fileno(self, /)
 |      Return underlying file descriptor if one exists.
 |
 |      Raise OSError if the IO object does not use a file descriptor.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from _IOBase:
 |
 |  __dict__
shelve.DEFAULT_PROTOCOL
Python Library Documentation: int object

class int(object)
 |  int([x]) -> integer
 |  int(x, base=10) -> integer
 |
 |  Convert a number or string to an integer, or return 0 if no arguments
 |  are given.  If x is a number, return x.__int__().  For floating-point
 |  numbers, this truncates towards zero.
 |
 |  If x is not a number or if base is given, then x must be a string,
 |  bytes, or bytearray instance representing an integer literal in the
 |  given base.  The literal can be preceded by '+' or '-' and be surrounded
 |  by whitespace.  The base defaults to 10.  Valid bases are 0 and 2-36.
 |  Base 0 means to interpret the base from the string as an integer literal.
 |  >>> int('0b100', base=0)
 |  4
 |
 |  Built-in subclasses:
 |      bool
 |
 |  Methods defined here:
 |
 |  __abs__(self, /)
 |      abs(self)
 |
 |  __add__(self, value, /)
 |      Return self+value.
 |
 |  __and__(self, value, /)
 |      Return self&value.
 |
 |  __bool__(self, /)
 |      True if self else False
 |
 |  __ceil__(...)
 |      Ceiling of an Integral returns itself.
 |
 |  __divmod__(self, value, /)
 |      Return divmod(self, value).
 |
 |  __eq__(self, value, /)
 |      Return self==value.
 |
 |  __float__(self, /)
 |      float(self)
 |
 |  __floor__(...)
 |      Flooring an Integral returns itself.
 |
 |  __floordiv__(self, value, /)
 |      Return self//value.
 |
 |  __format__(self, format_spec, /)
 |      Convert to a string according to format_spec.
 |
 |  __ge__(self, value, /)
 |      Return self>=value.
 |
 |  __getattribute__(self, name, /)
 |      Return getattr(self, name).
 |
 |  __getnewargs__(self, /)
 |
 |  __gt__(self, value, /)
 |      Return self>value.
 |
 |  __hash__(self, /)
 |      Return hash(self).
 |
 |  __index__(self, /)
 |      Return self converted to an integer, if self is suitable for use as an index into a list.
 |
 |  __int__(self, /)
 |      int(self)
 |
 |  __invert__(self, /)
 |      ~self
 |
 |  __le__(self, value, /)
 |      Return self<=value.
 |
 |  __lshift__(self, value, /)
 |      Return self<<value.
 |
 |  __lt__(self, value, /)
 |      Return self<value.
 |
 |  __mod__(self, value, /)
 |      Return self%value.
 |
 |  __mul__(self, value, /)
 |      Return self*value.
 |
 |  __ne__(self, value, /)
 |      Return self!=value.
 |
 |  __neg__(self, /)
 |      -self
 |
 |  __or__(self, value, /)
 |      Return self|value.
 |
 |  __pos__(self, /)
 |      +self
 |
 |  __pow__(self, value, mod=None, /)
 |      Return pow(self, value, mod).
 |
 |  __radd__(self, value, /)
 |      Return value+self.
 |
 |  __rand__(self, value, /)
 |      Return value&self.
 |
 |  __rdivmod__(self, value, /)
 |      Return divmod(value, self).
 |
 |  __repr__(self, /)
 |      Return repr(self).
 |
 |  __rfloordiv__(self, value, /)
 |      Return value//self.
 |
 |  __rlshift__(self, value, /)
 |      Return value<<self.
 |
 |  __rmod__(self, value, /)
 |      Return value%self.
 |
 |  __rmul__(self, value, /)
 |      Return value*self.
 |
 |  __ror__(self, value, /)
 |      Return value|self.
 |
 |  __round__(...)
 |      Rounding an Integral returns itself.
 |
 |      Rounding with an ndigits argument also returns an integer.
 |
 |  __rpow__(self, value, mod=None, /)
 |      Return pow(value, self, mod).
 |
 |  __rrshift__(self, value, /)
 |      Return value>>self.
 |
 |  __rshift__(self, value, /)
 |      Return self>>value.
 |
 |  __rsub__(self, value, /)
 |      Return value-self.
 |
 |  __rtruediv__(self, value, /)
 |      Return value/self.
 |
 |  __rxor__(self, value, /)
 |      Return value^self.
 |
 |  __sizeof__(self, /)
 |      Returns size in memory, in bytes.
 |
 |  __sub__(self, value, /)
 |      Return self-value.
 |
 |  __truediv__(self, value, /)
 |      Return self/value.
 |
 |  __trunc__(...)
 |      Truncating an Integral returns itself.
 |
 |  __xor__(self, value, /)
 |      Return self^value.
 |
 |  as_integer_ratio(self, /)
 |      Return a pair of integers, whose ratio is equal to the original int.
 |
 |      The ratio is in lowest terms and has a positive denominator.
 |
 |      >>> (10).as_integer_ratio()
 |      (10, 1)
 |      >>> (-10).as_integer_ratio()
 |      (-10, 1)
 |      >>> (0).as_integer_ratio()
 |      (0, 1)
 |
 |  bit_count(self, /)
 |      Number of ones in the binary representation of the absolute value of self.
 |
 |      Also known as the population count.
 |
 |      >>> bin(13)
 |      '0b1101'
 |      >>> (13).bit_count()
 |      3
 |
 |  bit_length(self, /)
 |      Number of bits necessary to represent self in binary.
 |
 |      >>> bin(37)
 |      '0b100101'
 |      >>> (37).bit_length()
 |      6
 |
 |  conjugate(...)
 |      Returns self, the complex conjugate of any int.
 |
 |  is_integer(self, /)
 |      Returns True. Exists for duck type compatibility with float.is_integer.
 |
 |  to_bytes(self, /, length=1, byteorder='big', *, signed=False)
 |      Return an array of bytes representing an integer.
 |
 |      length
 |        Length of bytes object to use.  An OverflowError is raised if the
 |        integer is not representable with the given number of bytes.  Default
 |        is length 1.
 |      byteorder
 |        The byte order used to represent the integer.  If byteorder is 'big',
 |        the most significant byte is at the beginning of the byte array.  If
 |        byteorder is 'little', the most significant byte is at the end of the
 |        byte array.  To request the native byte order of the host system, use
 |        `sys.byteorder' as the byte order value.  Default is to use 'big'.
 |      signed
 |        Determines whether two's complement is used to represent the integer.
 |        If signed is False and a negative integer is given, an OverflowError
 |        is raised.
 |
 |  ----------------------------------------------------------------------
 |  Class methods defined here:
 |
 |  from_bytes(bytes, byteorder='big', *, signed=False)
 |      Return the integer represented by the given array of bytes.
 |
 |      bytes
 |        Holds the array of bytes to convert.  The argument must either
 |        support the buffer protocol or be an iterable object producing bytes.
 |        Bytes and bytearray are examples of built-in objects that support the
 |        buffer protocol.
 |      byteorder
 |        The byte order used to represent the integer.  If byteorder is 'big',
 |        the most significant byte is at the beginning of the byte array.  If
 |        byteorder is 'little', the most significant byte is at the end of the
 |        byte array.  To request the native byte order of the host system, use
 |        `sys.byteorder' as the byte order value.  Default is to use 'big'.
 |      signed
 |        Indicates whether two's complement is used to represent the integer.
 |
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |
 |  __new__(*args, **kwargs)
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |
 |  denominator
 |      the denominator of a rational number in lowest terms
 |
 |  imag
 |      the imaginary part of a complex number
 |
 |  numerator
 |      the numerator of a rational number in lowest terms
 |
 |  real
 |      the real part of a complex number
shelve.DbfilenameShelf
Python Library Documentation: class DbfilenameShelf in module shelve

class DbfilenameShelf(Shelf)
 |  DbfilenameShelf(filename, flag='c', protocol=None, writeback=False)
 |
 |  Shelf implementation using the "dbm" generic dbm interface.
 |
 |  This is initialized with the filename for the dbm database.
 |  See the module's __doc__ string for an overview of the interface.
 |
 |  Method resolution order:
 |      DbfilenameShelf
 |      Shelf
 |      collections.abc.MutableMapping
 |      collections.abc.Mapping
 |      collections.abc.Collection
 |      collections.abc.Sized
 |      collections.abc.Iterable
 |      collections.abc.Container
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __init__(self, filename, flag='c', protocol=None, writeback=False)
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  __abstractmethods__ = frozenset()
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from Shelf:
 |
 |  __contains__(self, key)
 |
 |  __del__(self)
 |
 |  __delitem__(self, key)
 |
 |  __enter__(self)
 |
 |  __exit__(self, type, value, traceback)
 |
 |  __getitem__(self, key)
 |
 |  __iter__(self)
 |
 |  __len__(self)
 |
 |  __setitem__(self, key, value)
 |
 |  close(self)
 |
 |  get(self, key, default=None)
 |      D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
 |
 |  sync(self)
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from Shelf:
 |
 |  __dict__
 |      dictionary for instance variables
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from collections.abc.MutableMapping:
 |
 |  clear(self)
 |      D.clear() -> None.  Remove all items from D.
 |
 |  pop(self, key, default=<object object at 0x000001B44F9681F0>)
 |      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
 |      If key is not found, d is returned if given, otherwise KeyError is raised.
 |
 |  popitem(self)
 |      D.popitem() -> (k, v), remove and return some (key, value) pair
 |      as a 2-tuple; but raise KeyError if D is empty.
 |
 |  setdefault(self, key, default=None)
 |      D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
 |
 |  update(self, other=(), /, **kwds)
 |      D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
 |      If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
 |      If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
 |      In either case, this is followed by: for k, v in F.items(): D[k] = v
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from collections.abc.Mapping:
 |
 |  __eq__(self, other)
 |      Return self==value.
 |
 |  items(self)
 |      D.items() -> a set-like object providing a view on D's items
 |
 |  keys(self)
 |      D.keys() -> a set-like object providing a view on D's keys
 |
 |  values(self)
 |      D.values() -> an object providing a view on D's values
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes inherited from collections.abc.Mapping:
 |
 |  __hash__ = None
 |
 |  __reversed__ = None
 |
 |  ----------------------------------------------------------------------
 |  Class methods inherited from collections.abc.Collection:
 |
 |  __subclasshook__(C)
 |      Abstract classes can override this to customize issubclass().
 |
 |      This is invoked early on by abc.ABCMeta.__subclasscheck__().
 |      It should return True, False or NotImplemented.  If it returns
 |      NotImplemented, the normal algorithm is used.  Otherwise, it
 |      overrides the normal algorithm (and the outcome is cached).
 |
 |  ----------------------------------------------------------------------
 |  Class methods inherited from collections.abc.Iterable:
 |
 |  __class_getitem__ = GenericAlias(...)
 |      Represent a PEP 585 generic type
 |
 |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
shelve.Pickler
Python Library Documentation: class Pickler in module _pickle

class Pickler(builtins.object)
 |  Pickler(file, protocol=None, fix_imports=True, buffer_callback=None)
 |
 |  This takes a binary file for writing a pickle data stream.
 |
 |  The optional *protocol* argument tells the pickler to use the given
 |  protocol; supported protocols are 0, 1, 2, 3, 4 and 5.  The default
 |  protocol is 4. It was introduced in Python 3.4, and is incompatible
 |  with previous versions.
 |
 |  Specifying a negative protocol version selects the highest protocol
 |  version supported.  The higher the protocol used, the more recent the
 |  version of Python needed to read the pickle produced.
 |
 |  The *file* argument must have a write() method that accepts a single
 |  bytes argument. It can thus be a file object opened for binary
 |  writing, an io.BytesIO instance, or any other custom object that meets
 |  this interface.
 |
 |  If *fix_imports* is True and protocol is less than 3, pickle will try
 |  to map the new Python 3 names to the old module names used in Python
 |  2, so that the pickle data stream is readable with Python 2.
 |
 |  If *buffer_callback* is None (the default), buffer views are
 |  serialized into *file* as part of the pickle stream.
 |
 |  If *buffer_callback* is not None, then it can be called any number
 |  of times with a buffer view.  If the callback returns a false value
 |  (such as None), the given buffer is out-of-band; otherwise the
 |  buffer is serialized in-band, i.e. inside the pickle stream.
 |
 |  It is an error if *buffer_callback* is not None and *protocol*
 |  is None or smaller than 5.
 |
 |  Methods defined here:
 |
 |  __init__(self, /, *args, **kwargs)
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __sizeof__(self, /)
 |      Returns size in memory, in bytes.
 |
 |  clear_memo(self, /)
 |      Clears the pickler's "memo".
 |
 |      The memo is the data structure that remembers which objects the
 |      pickler has already seen, so that shared or recursive objects are
 |      pickled by reference and not by value.  This method is useful when
 |      re-using picklers.
 |
 |  dump(self, obj, /)
 |      Write a pickled representation of the given object to the open file.
 |
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |
 |  __new__(*args, **kwargs)
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |
 |  bin
 |
 |  dispatch_table
 |
 |  fast
 |
 |  memo
 |
 |  persistent_id
shelve.Shelf
Python Library Documentation: class Shelf in module shelve

class Shelf(collections.abc.MutableMapping)
 |  Shelf(dict, protocol=None, writeback=False, keyencoding='utf-8')
 |
 |  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.
 |
 |  Method resolution order:
 |      Shelf
 |      collections.abc.MutableMapping
 |      collections.abc.Mapping
 |      collections.abc.Collection
 |      collections.abc.Sized
 |      collections.abc.Iterable
 |      collections.abc.Container
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  __contains__(self, key)
 |
 |  __del__(self)
 |
 |  __delitem__(self, key)
 |
 |  __enter__(self)
 |
 |  __exit__(self, type, value, traceback)
 |
 |  __getitem__(self, key)
 |
 |  __init__(self, dict, protocol=None, writeback=False, keyencoding='utf-8')
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __iter__(self)
 |
 |  __len__(self)
 |
 |  __setitem__(self, key, value)
 |
 |  close(self)
 |
 |  get(self, key, default=None)
 |      D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
 |
 |  sync(self)
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |
 |  __dict__
 |      dictionary for instance variables
 |
 |  __weakref__
 |      list of weak references to the object
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes defined here:
 |
 |  __abstractmethods__ = frozenset()
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from collections.abc.MutableMapping:
 |
 |  clear(self)
 |      D.clear() -> None.  Remove all items from D.
 |
 |  pop(self, key, default=<object object at 0x000001B44F9681F0>)
 |      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
 |      If key is not found, d is returned if given, otherwise KeyError is raised.
 |
 |  popitem(self)
 |      D.popitem() -> (k, v), remove and return some (key, value) pair
 |      as a 2-tuple; but raise KeyError if D is empty.
 |
 |  setdefault(self, key, default=None)
 |      D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
 |
 |  update(self, other=(), /, **kwds)
 |      D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
 |      If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
 |      If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
 |      In either case, this is followed by: for k, v in F.items(): D[k] = v
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from collections.abc.Mapping:
 |
 |  __eq__(self, other)
 |      Return self==value.
 |
 |  items(self)
 |      D.items() -> a set-like object providing a view on D's items
 |
 |  keys(self)
 |      D.keys() -> a set-like object providing a view on D's keys
 |
 |  values(self)
 |      D.values() -> an object providing a view on D's values
 |
 |  ----------------------------------------------------------------------
 |  Data and other attributes inherited from collections.abc.Mapping:
 |
 |  __hash__ = None
 |
 |  __reversed__ = None
 |
 |  ----------------------------------------------------------------------
 |  Class methods inherited from collections.abc.Collection:
 |
 |  __subclasshook__(C)
 |      Abstract classes can override this to customize issubclass().
 |
 |      This is invoked early on by abc.ABCMeta.__subclasscheck__().
 |      It should return True, False or NotImplemented.  If it returns
 |      NotImplemented, the normal algorithm is used.  Otherwise, it
 |      overrides the normal algorithm (and the outcome is cached).
 |
 |  ----------------------------------------------------------------------
 |  Class methods inherited from collections.abc.Iterable:
 |
 |  __class_getitem__ = GenericAlias(...)
 |      Represent a PEP 585 generic type
 |
 |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).
shelve.Unpickler
Python Library Documentation: class Unpickler in module _pickle

class Unpickler(builtins.object)
 |  Unpickler(file, *, fix_imports=True, encoding='ASCII', errors='strict', buffers=())
 |
 |  This takes a binary file for reading a pickle data stream.
 |
 |  The protocol version of the pickle is detected automatically, so no
 |  protocol argument is needed.  Bytes past the pickled object's
 |  representation are ignored.
 |
 |  The argument *file* must have two methods, a read() method that takes
 |  an integer argument, and a readline() method that requires no
 |  arguments.  Both methods should return bytes.  Thus *file* can be a
 |  binary file object opened for reading, an io.BytesIO object, or any
 |  other custom object that meets this interface.
 |
 |  Optional keyword arguments are *fix_imports*, *encoding* and *errors*,
 |  which are used to control compatibility support for pickle stream
 |  generated by Python 2.  If *fix_imports* is True, pickle will try to
 |  map the old Python 2 names to the new names used in Python 3.  The
 |  *encoding* and *errors* tell pickle how to decode 8-bit string
 |  instances pickled by Python 2; these default to 'ASCII' and 'strict',
 |  respectively.  The *encoding* can be 'bytes' to read these 8-bit
 |  string instances as bytes objects.
 |
 |  Methods defined here:
 |
 |  __init__(self, /, *args, **kwargs)
 |      Initialize self.  See help(type(self)) for accurate signature.
 |
 |  __sizeof__(self, /)
 |      Returns size in memory, in bytes.
 |
 |  find_class(self, module_name, global_name, /)
 |      Return an object from a specified module.
 |
 |      If necessary, the module will be imported. Subclasses may override
 |      this method (e.g. to restrict unpickling of arbitrary classes and
 |      functions).
 |
 |      This method is called whenever a class or a function object is
 |      needed.  Both arguments passed are str objects.
 |
 |  load(self, /)
 |      Load a pickle.
 |
 |      Read a pickled object representation from the open file object given
 |      in the constructor, and return the reconstituted object hierarchy
 |      specified therein.
 |
 |  ----------------------------------------------------------------------
 |  Static methods defined here:
 |
 |  __new__(*args, **kwargs)
 |      Create and return a new object.  See help(type) for accurate signature.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |
 |  memo
 |
 |  persistent_load
shelve.collections
Python Library Documentation: package collections

NAME
    collections

MODULE REFERENCE
    https://docs.python.org/3.12/library/collections.html

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

DESCRIPTION
    This module implements specialized container datatypes providing
    alternatives to Python's general purpose built-in containers, dict,
    list, set, and tuple.

    * namedtuple   factory function for creating tuple subclasses with named fields
    * deque        list-like container with fast appends and pops on either end
    * ChainMap     dict-like class for creating a single view of multiple mappings
    * Counter      dict subclass for counting hashable objects
    * OrderedDict  dict subclass that remembers the order entries were added
    * defaultdict  dict subclass that calls a factory function to supply missing values
    * UserDict     wrapper around dictionary objects for easier dict subclassing
    * UserList     wrapper around list objects for easier list subclassing
    * UserString   wrapper around string objects for easier string subclassing

PACKAGE CONTENTS
    abc

SUBMODULES
    _collections_abc

CLASSES
    builtins.dict(builtins.object)
        Counter
        OrderedDict
        defaultdict
    builtins.object
        deque
    collections.abc.MutableMapping(collections.abc.Mapping)
        ChainMap
        UserDict
    collections.abc.MutableSequence(collections.abc.Sequence)
        UserList
    collections.abc.Sequence(collections.abc.Reversible, collections.abc.Collection)
        UserString

    class ChainMap(collections.abc.MutableMapping)
     |  ChainMap(*maps)
     |
     |  A ChainMap groups multiple dicts (or other mappings) together
     |  to create a single, updateable view.
     |
     |  The underlying mappings are stored in a list.  That list is public and can
     |  be accessed or updated using the *maps* attribute.  There is no other
     |  state.
     |
     |  Lookups search the underlying mappings successively until a key is found.
     |  In contrast, writes, updates, and deletions only operate on the first
     |  mapping.
     |
     |  Method resolution order:
     |      ChainMap
     |      collections.abc.MutableMapping
     |      collections.abc.Mapping
     |      collections.abc.Collection
     |      collections.abc.Sized
     |      collections.abc.Iterable
     |      collections.abc.Container
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __bool__(self)
     |
     |  __contains__(self, key)
     |
     |  __copy__ = copy(self)
     |
     |  __delitem__(self, key)
     |
     |  __getitem__(self, key)
     |
     |  __init__(self, *maps)
     |      Initialize a ChainMap by setting *maps* to the given mappings.
     |      If no mappings are provided, a single empty dictionary is used.
     |
     |  __ior__(self, other)
     |
     |  __iter__(self)
     |
     |  __len__(self)
     |
     |  __missing__(self, key)
     |
     |  __or__(self, other)
     |      Return self|value.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  __ror__(self, other)
     |      Return value|self.
     |
     |  __setitem__(self, key, value)
     |
     |  clear(self)
     |      Clear maps[0], leaving maps[1:] intact.
     |
     |  copy(self)
     |      New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]
     |
     |  get(self, key, default=None)
     |      D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
     |
     |  new_child(self, m=None, **kwargs)
     |      New ChainMap with a new map followed by all previous maps.
     |      If no map is provided, an empty dict is used.
     |      Keyword arguments update the map or new empty dict.
     |
     |  pop(self, key, *args)
     |      Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].
     |
     |  popitem(self)
     |      Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  fromkeys(iterable, *args)
     |      Create a ChainMap with a single dict created from the iterable.
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties defined here:
     |
     |  parents
     |      New ChainMap from maps[1:].
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __abstractmethods__ = frozenset()
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from collections.abc.MutableMapping:
     |
     |  setdefault(self, key, default=None)
     |      D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
     |
     |  update(self, other=(), /, **kwds)
     |      D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
     |      If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
     |      If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
     |      In either case, this is followed by: for k, v in F.items(): D[k] = v
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from collections.abc.Mapping:
     |
     |  __eq__(self, other)
     |      Return self==value.
     |
     |  items(self)
     |      D.items() -> a set-like object providing a view on D's items
     |
     |  keys(self)
     |      D.keys() -> a set-like object providing a view on D's keys
     |
     |  values(self)
     |      D.values() -> an object providing a view on D's values
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from collections.abc.Mapping:
     |
     |  __hash__ = None
     |
     |  __reversed__ = None
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from collections.abc.Collection:
     |
     |  __subclasshook__(C)
     |      Abstract classes can override this to customize issubclass().
     |
     |      This is invoked early on by abc.ABCMeta.__subclasscheck__().
     |      It should return True, False or NotImplemented.  If it returns
     |      NotImplemented, the normal algorithm is used.  Otherwise, it
     |      overrides the normal algorithm (and the outcome is cached).
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from collections.abc.Iterable:
     |
     |  __class_getitem__ = GenericAlias(...)
     |      Represent a PEP 585 generic type
     |
     |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).

    class Counter(builtins.dict)
     |  Counter(iterable=None, /, **kwds)
     |
     |  Dict subclass for counting hashable items.  Sometimes called a bag
     |  or multiset.  Elements are stored as dictionary keys and their counts
     |  are stored as dictionary values.
     |
     |  >>> c = Counter('abcdeabcdabcaba')  # count elements from a string
     |
     |  >>> c.most_common(3)                # three most common elements
     |  [('a', 5), ('b', 4), ('c', 3)]
     |  >>> sorted(c)                       # list all unique elements
     |  ['a', 'b', 'c', 'd', 'e']
     |  >>> ''.join(sorted(c.elements()))   # list elements with repetitions
     |  'aaaaabbbbcccdde'
     |  >>> sum(c.values())                 # total of all counts
     |  15
     |
     |  >>> c['a']                          # count of letter 'a'
     |  5
     |  >>> for elem in 'shazam':           # update counts from an iterable
     |  ...     c[elem] += 1                # by adding 1 to each element's count
     |  >>> c['a']                          # now there are seven 'a'
     |  7
     |  >>> del c['b']                      # remove all 'b'
     |  >>> c['b']                          # now there are zero 'b'
     |  0
     |
     |  >>> d = Counter('simsalabim')       # make another counter
     |  >>> c.update(d)                     # add in the second counter
     |  >>> c['a']                          # now there are nine 'a'
     |  9
     |
     |  >>> c.clear()                       # empty the counter
     |  >>> c
     |  Counter()
     |
     |  Note:  If a count is set to zero or reduced to zero, it will remain
     |  in the counter until the entry is deleted or the counter is cleared:
     |
     |  >>> c = Counter('aaabbc')
     |  >>> c['b'] -= 2                     # reduce the count of 'b' by two
     |  >>> c.most_common()                 # 'b' is still in, but its count is zero
     |  [('a', 3), ('c', 1), ('b', 0)]
     |
     |  Method resolution order:
     |      Counter
     |      builtins.dict
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __add__(self, other)
     |      Add counts from two counters.
     |
     |      >>> Counter('abbb') + Counter('bcc')
     |      Counter({'b': 4, 'c': 2, 'a': 1})
     |
     |  __and__(self, other)
     |      Intersection is the minimum of corresponding counts.
     |
     |      >>> Counter('abbb') & Counter('bcc')
     |      Counter({'b': 1})
     |
     |  __delitem__(self, elem)
     |      Like dict.__delitem__() but does not raise KeyError for missing values.
     |
     |  __eq__(self, other)
     |      True if all counts agree. Missing counts are treated as zero.
     |
     |  __ge__(self, other)
     |      True if all counts in self are a superset of those in other.
     |
     |  __gt__(self, other)
     |      True if all counts in self are a proper superset of those in other.
     |
     |  __iadd__(self, other)
     |      Inplace add from another counter, keeping only positive counts.
     |
     |      >>> c = Counter('abbb')
     |      >>> c += Counter('bcc')
     |      >>> c
     |      Counter({'b': 4, 'c': 2, 'a': 1})
     |
     |  __iand__(self, other)
     |      Inplace intersection is the minimum of corresponding counts.
     |
     |      >>> c = Counter('abbb')
     |      >>> c &= Counter('bcc')
     |      >>> c
     |      Counter({'b': 1})
     |
     |  __init__(self, iterable=None, /, **kwds)
     |      Create a new, empty Counter object.  And if given, count elements
     |      from an input iterable.  Or, initialize the count from another mapping
     |      of elements to their counts.
     |
     |      >>> c = Counter()                           # a new, empty counter
     |      >>> c = Counter('gallahad')                 # a new counter from an iterable
     |      >>> c = Counter({'a': 4, 'b': 2})           # a new counter from a mapping
     |      >>> c = Counter(a=4, b=2)                   # a new counter from keyword args
     |
     |  __ior__(self, other)
     |      Inplace union is the maximum of value from either counter.
     |
     |      >>> c = Counter('abbb')
     |      >>> c |= Counter('bcc')
     |      >>> c
     |      Counter({'b': 3, 'c': 2, 'a': 1})
     |
     |  __isub__(self, other)
     |      Inplace subtract counter, but keep only results with positive counts.
     |
     |      >>> c = Counter('abbbc')
     |      >>> c -= Counter('bccd')
     |      >>> c
     |      Counter({'b': 2, 'a': 1})
     |
     |  __le__(self, other)
     |      True if all counts in self are a subset of those in other.
     |
     |  __lt__(self, other)
     |      True if all counts in self are a proper subset of those in other.
     |
     |  __missing__(self, key)
     |      The count of elements not in the Counter is zero.
     |
     |  __ne__(self, other)
     |      True if any counts disagree. Missing counts are treated as zero.
     |
     |  __neg__(self)
     |      Subtracts from an empty counter.  Strips positive and zero counts,
     |      and flips the sign on negative counts.
     |
     |  __or__(self, other)
     |      Union is the maximum of value in either of the input counters.
     |
     |      >>> Counter('abbb') | Counter('bcc')
     |      Counter({'b': 3, 'c': 2, 'a': 1})
     |
     |  __pos__(self)
     |      Adds an empty counter, effectively stripping negative and zero counts
     |
     |  __reduce__(self)
     |      Helper for pickle.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  __sub__(self, other)
     |      Subtract count, but keep only results with positive counts.
     |
     |      >>> Counter('abbbc') - Counter('bccd')
     |      Counter({'b': 2, 'a': 1})
     |
     |  copy(self)
     |      Return a shallow copy.
     |
     |  elements(self)
     |      Iterator over elements repeating each as many times as its count.
     |
     |      >>> c = Counter('ABCABC')
     |      >>> sorted(c.elements())
     |      ['A', 'A', 'B', 'B', 'C', 'C']
     |
     |      Knuth's example for prime factors of 1836:  2**2 * 3**3 * 17**1
     |
     |      >>> import math
     |      >>> prime_factors = Counter({2: 2, 3: 3, 17: 1})
     |      >>> math.prod(prime_factors.elements())
     |      1836
     |
     |      Note, if an element's count has been set to zero or is a negative
     |      number, elements() will ignore it.
     |
     |  most_common(self, n=None)
     |      List the n most common elements and their counts from the most
     |      common to the least.  If n is None, then list all element counts.
     |
     |      >>> Counter('abracadabra').most_common(3)
     |      [('a', 5), ('b', 2), ('r', 2)]
     |
     |  subtract(self, iterable=None, /, **kwds)
     |      Like dict.update() but subtracts counts instead of replacing them.
     |      Counts can be reduced below zero.  Both the inputs and outputs are
     |      allowed to contain zero and negative counts.
     |
     |      Source can be an iterable, a dictionary, or another Counter instance.
     |
     |      >>> c = Counter('which')
     |      >>> c.subtract('witch')             # subtract elements from another iterable
     |      >>> c.subtract(Counter('watch'))    # subtract elements from another counter
     |      >>> c['h']                          # 2 in which, minus 1 in witch, minus 1 in watch
     |      0
     |      >>> c['w']                          # 1 in which, minus 1 in witch, minus 1 in watch
     |      -1
     |
     |  total(self)
     |      Sum of the counts
     |
     |  update(self, iterable=None, /, **kwds)
     |      Like dict.update() but add counts instead of replacing them.
     |
     |      Source can be an iterable, a dictionary, or another Counter instance.
     |
     |      >>> c = Counter('which')
     |      >>> c.update('witch')           # add elements from another iterable
     |      >>> d = Counter('watch')
     |      >>> c.update(d)                 # add elements from another counter
     |      >>> c['h']                      # four 'h' in which, witch, and watch
     |      4
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  fromkeys(iterable, v=None)
     |      Create a new dictionary with keys from iterable and values set to value.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __hash__ = None
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.dict:
     |
     |  __contains__(self, key, /)
     |      True if the dictionary has the specified key, else False.
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __getitem__(self, key, /)
     |      Return self[key].
     |
     |  __iter__(self, /)
     |      Implement iter(self).
     |
     |  __len__(self, /)
     |      Return len(self).
     |
     |  __reversed__(self, /)
     |      Return a reverse iterator over the dict keys.
     |
     |  __ror__(self, value, /)
     |      Return value|self.
     |
     |  __setitem__(self, key, value, /)
     |      Set self[key] to value.
     |
     |  __sizeof__(...)
     |      D.__sizeof__() -> size of D in memory, in bytes
     |
     |  clear(...)
     |      D.clear() -> None.  Remove all items from D.
     |
     |  get(self, key, default=None, /)
     |      Return the value for key if key is in the dictionary, else default.
     |
     |  items(...)
     |      D.items() -> a set-like object providing a view on D's items
     |
     |  keys(...)
     |      D.keys() -> a set-like object providing a view on D's keys
     |
     |  pop(...)
     |      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
     |
     |      If the key is not found, return the default if given; otherwise,
     |      raise a KeyError.
     |
     |  popitem(self, /)
     |      Remove and return a (key, value) pair as a 2-tuple.
     |
     |      Pairs are returned in LIFO (last-in, first-out) order.
     |      Raises KeyError if the dict is empty.
     |
     |  setdefault(self, key, default=None, /)
     |      Insert key with a value of default if key is not in the dictionary.
     |
     |      Return the value for key if key is in the dictionary, else default.
     |
     |  values(...)
     |      D.values() -> an object providing a view on D's values
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from builtins.dict:
     |
     |  __class_getitem__(...)
     |      See PEP 585
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.dict:
     |
     |  __new__(*args, **kwargs) class method of builtins.dict
     |      Create and return a new object.  See help(type) for accurate signature.

    class OrderedDict(builtins.dict)
     |  Dictionary that remembers insertion order
     |
     |  Method resolution order:
     |      OrderedDict
     |      builtins.dict
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __delitem__(self, key, /)
     |      Delete self[key].
     |
     |  __eq__(self, value, /)
     |      Return self==value.
     |
     |  __ge__(self, value, /)
     |      Return self>=value.
     |
     |  __gt__(self, value, /)
     |      Return self>value.
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __ior__(self, value, /)
     |      Return self|=value.
     |
     |  __iter__(self, /)
     |      Implement iter(self).
     |
     |  __le__(self, value, /)
     |      Return self<=value.
     |
     |  __lt__(self, value, /)
     |      Return self<value.
     |
     |  __ne__(self, value, /)
     |      Return self!=value.
     |
     |  __or__(self, value, /)
     |      Return self|value.
     |
     |  __reduce__(...)
     |      Return state information for pickling
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __reversed__(...)
     |      od.__reversed__() <==> reversed(od)
     |
     |  __ror__(self, value, /)
     |      Return value|self.
     |
     |  __setitem__(self, key, value, /)
     |      Set self[key] to value.
     |
     |  __sizeof__(...)
     |      D.__sizeof__() -> size of D in memory, in bytes
     |
     |  clear(...)
     |      od.clear() -> None.  Remove all items from od.
     |
     |  copy(...)
     |      od.copy() -> a shallow copy of od
     |
     |  items(...)
     |      D.items() -> a set-like object providing a view on D's items
     |
     |  keys(...)
     |      D.keys() -> a set-like object providing a view on D's keys
     |
     |  move_to_end(self, /, key, last=True)
     |      Move an existing element to the end (or beginning if last is false).
     |
     |      Raise KeyError if the element does not exist.
     |
     |  pop(...)
     |      od.pop(key[,default]) -> v, remove specified key and return the corresponding value.
     |
     |      If the key is not found, return the default if given; otherwise,
     |      raise a KeyError.
     |
     |  popitem(self, /, last=True)
     |      Remove and return a (key, value) pair from the dictionary.
     |
     |      Pairs are returned in LIFO order if last is true or FIFO order if false.
     |
     |  setdefault(self, /, key, default=None)
     |      Insert key with a value of default if key is not in the dictionary.
     |
     |      Return the value for key if key is in the dictionary, else default.
     |
     |  update(...)
     |      D.update([E, ]**F) -> None.  Update D from dict/iterable E and F.
     |      If E is present and has a .keys() method, then does:  for k in E: D[k] = E[k]
     |      If E is present and lacks a .keys() method, then does:  for k, v in E: D[k] = v
     |      In either case, this is followed by: for k in F:  D[k] = F[k]
     |
     |  values(...)
     |      D.values() -> an object providing a view on D's values
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  fromkeys(iterable, value=None)
     |      Create a new ordered dictionary with keys from iterable and values set to value.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __hash__ = None
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.dict:
     |
     |  __contains__(self, key, /)
     |      True if the dictionary has the specified key, else False.
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __getitem__(self, key, /)
     |      Return self[key].
     |
     |  __len__(self, /)
     |      Return len(self).
     |
     |  get(self, key, default=None, /)
     |      Return the value for key if key is in the dictionary, else default.
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from builtins.dict:
     |
     |  __class_getitem__(...)
     |      See PEP 585
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.dict:
     |
     |  __new__(*args, **kwargs) class method of builtins.dict
     |      Create and return a new object.  See help(type) for accurate signature.

    class UserDict(collections.abc.MutableMapping)
     |  UserDict(dict=None, /, **kwargs)
     |
     |  Method resolution order:
     |      UserDict
     |      collections.abc.MutableMapping
     |      collections.abc.Mapping
     |      collections.abc.Collection
     |      collections.abc.Sized
     |      collections.abc.Iterable
     |      collections.abc.Container
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __contains__(self, key)
     |      # Modify __contains__ and get() to work like dict
     |      # does when __missing__ is present.
     |
     |  __copy__(self)
     |
     |  __delitem__(self, key)
     |
     |  __getitem__(self, key)
     |
     |  __init__(self, dict=None, /, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __ior__(self, other)
     |
     |  __iter__(self)
     |
     |  __len__(self)
     |
     |  __or__(self, other)
     |      Return self|value.
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  __ror__(self, other)
     |      Return value|self.
     |
     |  __setitem__(self, key, item)
     |
     |  copy(self)
     |
     |  get(self, key, default=None)
     |      D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  fromkeys(iterable, value=None)
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __abstractmethods__ = frozenset()
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from collections.abc.MutableMapping:
     |
     |  clear(self)
     |      D.clear() -> None.  Remove all items from D.
     |
     |  pop(self, key, default=<object object at 0x000001B44F9681F0>)
     |      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
     |      If key is not found, d is returned if given, otherwise KeyError is raised.
     |
     |  popitem(self)
     |      D.popitem() -> (k, v), remove and return some (key, value) pair
     |      as a 2-tuple; but raise KeyError if D is empty.
     |
     |  setdefault(self, key, default=None)
     |      D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
     |
     |  update(self, other=(), /, **kwds)
     |      D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
     |      If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
     |      If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
     |      In either case, this is followed by: for k, v in F.items(): D[k] = v
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from collections.abc.Mapping:
     |
     |  __eq__(self, other)
     |      Return self==value.
     |
     |  items(self)
     |      D.items() -> a set-like object providing a view on D's items
     |
     |  keys(self)
     |      D.keys() -> a set-like object providing a view on D's keys
     |
     |  values(self)
     |      D.values() -> an object providing a view on D's values
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from collections.abc.Mapping:
     |
     |  __hash__ = None
     |
     |  __reversed__ = None
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from collections.abc.Collection:
     |
     |  __subclasshook__(C)
     |      Abstract classes can override this to customize issubclass().
     |
     |      This is invoked early on by abc.ABCMeta.__subclasscheck__().
     |      It should return True, False or NotImplemented.  If it returns
     |      NotImplemented, the normal algorithm is used.  Otherwise, it
     |      overrides the normal algorithm (and the outcome is cached).
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from collections.abc.Iterable:
     |
     |  __class_getitem__ = GenericAlias(...)
     |      Represent a PEP 585 generic type
     |
     |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).

    class UserList(collections.abc.MutableSequence)
     |  UserList(initlist=None)
     |
     |  A more or less complete user-defined wrapper around list objects.
     |
     |  Method resolution order:
     |      UserList
     |      collections.abc.MutableSequence
     |      collections.abc.Sequence
     |      collections.abc.Reversible
     |      collections.abc.Collection
     |      collections.abc.Sized
     |      collections.abc.Iterable
     |      collections.abc.Container
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __add__(self, other)
     |
     |  __contains__(self, item)
     |
     |  __copy__(self)
     |
     |  __delitem__(self, i)
     |
     |  __eq__(self, other)
     |      Return self==value.
     |
     |  __ge__(self, other)
     |      Return self>=value.
     |
     |  __getitem__(self, i)
     |
     |  __gt__(self, other)
     |      Return self>value.
     |
     |  __iadd__(self, other)
     |
     |  __imul__(self, n)
     |
     |  __init__(self, initlist=None)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __le__(self, other)
     |      Return self<=value.
     |
     |  __len__(self)
     |
     |  __lt__(self, other)
     |      Return self<value.
     |
     |  __mul__(self, n)
     |
     |  __radd__(self, other)
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  __rmul__ = __mul__(self, n)
     |
     |  __setitem__(self, i, item)
     |
     |  append(self, item)
     |      S.append(value) -- append value to the end of the sequence
     |
     |  clear(self)
     |      S.clear() -> None -- remove all items from S
     |
     |  copy(self)
     |
     |  count(self, item)
     |      S.count(value) -> integer -- return number of occurrences of value
     |
     |  extend(self, other)
     |      S.extend(iterable) -- extend sequence by appending elements from the iterable
     |
     |  index(self, item, *args)
     |      S.index(value, [start, [stop]]) -> integer -- return first index of value.
     |      Raises ValueError if the value is not present.
     |
     |      Supporting start and stop arguments is optional, but
     |      recommended.
     |
     |  insert(self, i, item)
     |      S.insert(index, value) -- insert value before index
     |
     |  pop(self, i=-1)
     |      S.pop([index]) -> item -- remove and return item at index (default last).
     |      Raise IndexError if list is empty or index is out of range.
     |
     |  remove(self, item)
     |      S.remove(value) -- remove first occurrence of value.
     |      Raise ValueError if the value is not present.
     |
     |  reverse(self)
     |      S.reverse() -- reverse *IN PLACE*
     |
     |  sort(self, /, *args, **kwds)
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __abstractmethods__ = frozenset()
     |
     |  __hash__ = None
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from collections.abc.Sequence:
     |
     |  __iter__(self)
     |
     |  __reversed__(self)
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from collections.abc.Reversible:
     |
     |  __subclasshook__(C)
     |      Abstract classes can override this to customize issubclass().
     |
     |      This is invoked early on by abc.ABCMeta.__subclasscheck__().
     |      It should return True, False or NotImplemented.  If it returns
     |      NotImplemented, the normal algorithm is used.  Otherwise, it
     |      overrides the normal algorithm (and the outcome is cached).
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from collections.abc.Iterable:
     |
     |  __class_getitem__ = GenericAlias(...)
     |      Represent a PEP 585 generic type
     |
     |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).

    class UserString(collections.abc.Sequence)
     |  UserString(seq)
     |
     |  Method resolution order:
     |      UserString
     |      collections.abc.Sequence
     |      collections.abc.Reversible
     |      collections.abc.Collection
     |      collections.abc.Sized
     |      collections.abc.Iterable
     |      collections.abc.Container
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __add__(self, other)
     |
     |  __complex__(self)
     |
     |  __contains__(self, char)
     |
     |  __eq__(self, string)
     |      Return self==value.
     |
     |  __float__(self)
     |
     |  __ge__(self, string)
     |      Return self>=value.
     |
     |  __getitem__(self, index)
     |
     |  __getnewargs__(self)
     |
     |  __gt__(self, string)
     |      Return self>value.
     |
     |  __hash__(self)
     |      Return hash(self).
     |
     |  __init__(self, seq)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __int__(self)
     |
     |  __le__(self, string)
     |      Return self<=value.
     |
     |  __len__(self)
     |
     |  __lt__(self, string)
     |      Return self<value.
     |
     |  __mod__(self, args)
     |
     |  __mul__(self, n)
     |
     |  __radd__(self, other)
     |
     |  __repr__(self)
     |      Return repr(self).
     |
     |  __rmod__(self, template)
     |
     |  __rmul__ = __mul__(self, n)
     |
     |  __str__(self)
     |      Return str(self).
     |
     |  capitalize(self)
     |      # the following methods are defined in alphabetical order:
     |
     |  casefold(self)
     |
     |  center(self, width, *args)
     |
     |  count(self, sub, start=0, end=9223372036854775807)
     |      S.count(value) -> integer -- return number of occurrences of value
     |
     |  encode(self, encoding='utf-8', errors='strict')
     |
     |  endswith(self, suffix, start=0, end=9223372036854775807)
     |
     |  expandtabs(self, tabsize=8)
     |
     |  find(self, sub, start=0, end=9223372036854775807)
     |
     |  format(self, /, *args, **kwds)
     |
     |  format_map(self, mapping)
     |
     |  index(self, sub, start=0, end=9223372036854775807)
     |      S.index(value, [start, [stop]]) -> integer -- return first index of value.
     |      Raises ValueError if the value is not present.
     |
     |      Supporting start and stop arguments is optional, but
     |      recommended.
     |
     |  isalnum(self)
     |
     |  isalpha(self)
     |
     |  isascii(self)
     |
     |  isdecimal(self)
     |
     |  isdigit(self)
     |
     |  isidentifier(self)
     |
     |  islower(self)
     |
     |  isnumeric(self)
     |
     |  isprintable(self)
     |
     |  isspace(self)
     |
     |  istitle(self)
     |
     |  isupper(self)
     |
     |  join(self, seq)
     |
     |  ljust(self, width, *args)
     |
     |  lower(self)
     |
     |  lstrip(self, chars=None)
     |
     |  partition(self, sep)
     |
     |  removeprefix(self, prefix, /)
     |
     |  removesuffix(self, suffix, /)
     |
     |  replace(self, old, new, maxsplit=-1)
     |
     |  rfind(self, sub, start=0, end=9223372036854775807)
     |
     |  rindex(self, sub, start=0, end=9223372036854775807)
     |
     |  rjust(self, width, *args)
     |
     |  rpartition(self, sep)
     |
     |  rsplit(self, sep=None, maxsplit=-1)
     |
     |  rstrip(self, chars=None)
     |
     |  split(self, sep=None, maxsplit=-1)
     |
     |  splitlines(self, keepends=False)
     |
     |  startswith(self, prefix, start=0, end=9223372036854775807)
     |
     |  strip(self, chars=None)
     |
     |  swapcase(self)
     |
     |  title(self)
     |
     |  translate(self, *args)
     |
     |  upper(self)
     |
     |  zfill(self, width)
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  maketrans(...)
     |      Return a translation table usable for str.translate().
     |
     |      If there is only one argument, it must be a dictionary mapping Unicode
     |      ordinals (integers) or characters to Unicode ordinals, strings or None.
     |      Character keys will be then converted to ordinals.
     |      If there are two arguments, they must be strings of equal length, and
     |      in the resulting dictionary, each character in x will be mapped to the
     |      character at the same position in y. If there is a third argument, it
     |      must be a string, whose characters will be mapped to None in the result.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __abstractmethods__ = frozenset()
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from collections.abc.Sequence:
     |
     |  __iter__(self)
     |
     |  __reversed__(self)
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from collections.abc.Reversible:
     |
     |  __subclasshook__(C)
     |      Abstract classes can override this to customize issubclass().
     |
     |      This is invoked early on by abc.ABCMeta.__subclasscheck__().
     |      It should return True, False or NotImplemented.  If it returns
     |      NotImplemented, the normal algorithm is used.  Otherwise, it
     |      overrides the normal algorithm (and the outcome is cached).
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from collections.abc.Iterable:
     |
     |  __class_getitem__ = GenericAlias(...)
     |      Represent a PEP 585 generic type
     |
     |      E.g. for t = list[int], t.__origin__ is list and t.__args__ is (int,).

    class defaultdict(builtins.dict)
     |  defaultdict(default_factory=None, /, [...]) --> dict with default factory
     |
     |  The default factory is called without arguments to produce
     |  a new value when a key is not present, in __getitem__ only.
     |  A defaultdict compares equal to a dict with the same items.
     |  All remaining arguments are treated the same as if they were
     |  passed to the dict constructor, including keyword arguments.
     |
     |  Method resolution order:
     |      defaultdict
     |      builtins.dict
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __copy__(...)
     |      D.copy() -> a shallow copy of D.
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __missing__(...)
     |      __missing__(key) # Called by __getitem__ for missing key; pseudo-code:
     |      if self.default_factory is None: raise KeyError((key,))
     |      self[key] = value = self.default_factory()
     |      return value
     |
     |  __or__(self, value, /)
     |      Return self|value.
     |
     |  __reduce__(...)
     |      Return state information for pickling.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __ror__(self, value, /)
     |      Return value|self.
     |
     |  copy(...)
     |      D.copy() -> a shallow copy of D.
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  __class_getitem__(...)
     |      See PEP 585
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  default_factory
     |      Factory for default value called by __missing__().
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.dict:
     |
     |  __contains__(self, key, /)
     |      True if the dictionary has the specified key, else False.
     |
     |  __delitem__(self, key, /)
     |      Delete self[key].
     |
     |  __eq__(self, value, /)
     |      Return self==value.
     |
     |  __ge__(self, value, /)
     |      Return self>=value.
     |
     |  __getitem__(self, key, /)
     |      Return self[key].
     |
     |  __gt__(self, value, /)
     |      Return self>value.
     |
     |  __ior__(self, value, /)
     |      Return self|=value.
     |
     |  __iter__(self, /)
     |      Implement iter(self).
     |
     |  __le__(self, value, /)
     |      Return self<=value.
     |
     |  __len__(self, /)
     |      Return len(self).
     |
     |  __lt__(self, value, /)
     |      Return self<value.
     |
     |  __ne__(self, value, /)
     |      Return self!=value.
     |
     |  __reversed__(self, /)
     |      Return a reverse iterator over the dict keys.
     |
     |  __setitem__(self, key, value, /)
     |      Set self[key] to value.
     |
     |  __sizeof__(...)
     |      D.__sizeof__() -> size of D in memory, in bytes
     |
     |  clear(...)
     |      D.clear() -> None.  Remove all items from D.
     |
     |  get(self, key, default=None, /)
     |      Return the value for key if key is in the dictionary, else default.
     |
     |  items(...)
     |      D.items() -> a set-like object providing a view on D's items
     |
     |  keys(...)
     |      D.keys() -> a set-like object providing a view on D's keys
     |
     |  pop(...)
     |      D.pop(k[,d]) -> v, remove specified key and return the corresponding value.
     |
     |      If the key is not found, return the default if given; otherwise,
     |      raise a KeyError.
     |
     |  popitem(self, /)
     |      Remove and return a (key, value) pair as a 2-tuple.
     |
     |      Pairs are returned in LIFO (last-in, first-out) order.
     |      Raises KeyError if the dict is empty.
     |
     |  setdefault(self, key, default=None, /)
     |      Insert key with a value of default if key is not in the dictionary.
     |
     |      Return the value for key if key is in the dictionary, else default.
     |
     |  update(...)
     |      D.update([E, ]**F) -> None.  Update D from dict/iterable E and F.
     |      If E is present and has a .keys() method, then does:  for k in E: D[k] = E[k]
     |      If E is present and lacks a .keys() method, then does:  for k, v in E: D[k] = v
     |      In either case, this is followed by: for k in F:  D[k] = F[k]
     |
     |  values(...)
     |      D.values() -> an object providing a view on D's values
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from builtins.dict:
     |
     |  fromkeys(iterable, value=None, /)
     |      Create a new dictionary with keys from iterable and values set to value.
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.dict:
     |
     |  __new__(*args, **kwargs) class method of builtins.dict
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes inherited from builtins.dict:
     |
     |  __hash__ = None

    class deque(builtins.object)
     |  deque([iterable[, maxlen]]) --> deque object
     |
     |  A list-like sequence optimized for data accesses near its endpoints.
     |
     |  Methods defined here:
     |
     |  __add__(self, value, /)
     |      Return self+value.
     |
     |  __contains__(self, key, /)
     |      Return bool(key in self).
     |
     |  __copy__(...)
     |      Return a shallow copy of a deque.
     |
     |  __delitem__(self, key, /)
     |      Delete self[key].
     |
     |  __eq__(self, value, /)
     |      Return self==value.
     |
     |  __ge__(self, value, /)
     |      Return self>=value.
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __getitem__(self, key, /)
     |      Return self[key].
     |
     |  __gt__(self, value, /)
     |      Return self>value.
     |
     |  __iadd__(self, value, /)
     |      Implement self+=value.
     |
     |  __imul__(self, value, /)
     |      Implement self*=value.
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __iter__(self, /)
     |      Implement iter(self).
     |
     |  __le__(self, value, /)
     |      Return self<=value.
     |
     |  __len__(self, /)
     |      Return len(self).
     |
     |  __lt__(self, value, /)
     |      Return self<value.
     |
     |  __mul__(self, value, /)
     |      Return self*value.
     |
     |  __ne__(self, value, /)
     |      Return self!=value.
     |
     |  __reduce__(...)
     |      Return state information for pickling.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __reversed__(...)
     |      D.__reversed__() -- return a reverse iterator over the deque
     |
     |  __rmul__(self, value, /)
     |      Return value*self.
     |
     |  __setitem__(self, key, value, /)
     |      Set self[key] to value.
     |
     |  __sizeof__(...)
     |      D.__sizeof__() -- size of D in memory, in bytes
     |
     |  append(...)
     |      Add an element to the right side of the deque.
     |
     |  appendleft(...)
     |      Add an element to the left side of the deque.
     |
     |  clear(...)
     |      Remove all elements from the deque.
     |
     |  copy(...)
     |      Return a shallow copy of a deque.
     |
     |  count(...)
     |      D.count(value) -- return number of occurrences of value
     |
     |  extend(...)
     |      Extend the right side of the deque with elements from the iterable
     |
     |  extendleft(...)
     |      Extend the left side of the deque with elements from the iterable
     |
     |  index(...)
     |      D.index(value, [start, [stop]]) -- return first index of value.
     |      Raises ValueError if the value is not present.
     |
     |  insert(...)
     |      D.insert(index, object) -- insert object before index
     |
     |  pop(...)
     |      Remove and return the rightmost element.
     |
     |  popleft(...)
     |      Remove and return the leftmost element.
     |
     |  remove(...)
     |      D.remove(value) -- remove first occurrence of value.
     |
     |  reverse(...)
     |      D.reverse() -- reverse *IN PLACE*
     |
     |  rotate(...)
     |      Rotate the deque n steps to the right (default n=1).  If n is negative, rotates left.
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  __class_getitem__(...)
     |      See PEP 585
     |
     |  ----------------------------------------------------------------------
     |  Static methods defined here:
     |
     |  __new__(*args, **kwargs)
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  maxlen
     |      maximum size of a deque or None if unbounded
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __hash__ = None

FUNCTIONS
    namedtuple(typename, field_names, *, rename=False, defaults=None, module=None)
        Returns a new subclass of tuple with named fields.

        >>> Point = namedtuple('Point', ['x', 'y'])
        >>> Point.__doc__                   # docstring for the new class
        'Point(x, y)'
        >>> p = Point(11, y=22)             # instantiate with positional args or keywords
        >>> p[0] + p[1]                     # indexable like a plain tuple
        33
        >>> x, y = p                        # unpack like a regular tuple
        >>> x, y
        (11, 22)
        >>> p.x + p.y                       # fields also accessible by name
        33
        >>> d = p._asdict()                 # convert to a dictionary
        >>> d['x']
        11
        >>> Point(**d)                      # convert from a dictionary
        Point(x=11, y=22)
        >>> p._replace(x=100)               # _replace() is like str.replace() but targets named fields
        Point(x=100, y=22)

DATA
    __all__ = ['ChainMap', 'Counter', 'OrderedDict', 'UserDict', 'UserList...

FILE
    c:\users\youse\appdata\local\programs\python\python312\lib\collections\__init__.py

shelve.open
Python Library Documentation: function open in module shelve

open(filename, flag='c', protocol=None, writeback=False)
    Open a persistent dictionary for reading and writing.

    The filename parameter is the base filename for the underlying
    database.  As a side-effect, an extension may be added to the
    filename and more than one file may be created.  The optional flag
    parameter has the same interpretation as the flag parameter of
    dbm.open(). The optional protocol parameter specifies the
    version of the pickle protocol.

    See the module's __doc__ string for an overview of the interface.