class_docstr: Persistent map/dict. Tries to follow the same naming conventions as the built in dict where feasible.
  
  Do not instantiate directly, instead use the factory functions :py:func:`m` or :py:func:`pmap` to
  create an instance.
  
  Was originally written as a very close copy of the Clojure equivalent but was later rewritten to closer
  re-assemble the python dict. This means that a sparse vector (a PVector) of buckets is used. The keys are
  hashed and the elements inserted at position hash % len(bucket_vector). Whenever the map size exceeds 2/3 of
  the containing vectors size the map is reallocated to a vector of double the size. This is done to avoid
  excessive hash collisions.
  
  This structure corresponds most closely to the built in dict type and is intended as a replacement. Where the
  semantics are the same (more or less) the same function names have been used but for some cases it is not possible,
  for example assignments and deletion of values.
  
  PMap implements the Mapping protocol and is Hashable. It also supports dot-notation for
  element access.
  
  Random access and insert is log32(n) where n is the size of the map.
  
  The following are examples of some common operations on persistent maps
  
  >>> m1 = m(a=1, b=3)
  >>> m2 = m1.set('c', 3)
  >>> m3 = m2.remove('a')
  >>> m1
  pmap({'a': 1, 'b': 3})
  >>> m2
  pmap({'a': 1, 'c': 3, 'b': 3})
  >>> m3
  pmap({'c': 3, 'b': 3})
  >>> m3['c']
  3
  >>> m3.c
  3
class_docstr_tok: ["Persistent","map\/dict",".","Tries","to","follow","the","same","naming","conventions","as","the","built","in","dict","where","feasible",".","Do","not","instantiate","directly",",","instead","use","the","factory","functions",":","py",":","func",":","`","m","`","or",":","py",":","func",":","`","pmap","`","to","create","an","instance",".","Was","originally","written","as","a","very","close","copy","of","the","Clojure","equivalent","but","was","later","rewritten","to","closer","re-assemble","the","python","dict",".","This","means","that","a","sparse","vector","(","a","PVector",")","of","buckets","is","used",".","The","keys","are","hashed","and","the","elements","inserted","at","position","hash","%","len","(","bucket_vector",")",".","Whenever","the","map","size","exceeds","2\/3","of","the","containing","vectors","size","the","map","is","reallocated","to","a","vector","of","double","the","size",".","This","is","done","to","avoid","excessive","hash","collisions",".","This","structure","corresponds","most","closely","to","the","built","in","dict","type","and","is","intended","as","a","replacement",".","Where","the","semantics","are","the","same","(","more","or","less",")","the","same","function","names","have","been","used","but","for","some","cases","it","is","not","possible",",","for","example","assignments","and","deletion","of","values",".","PMap","implements","the","Mapping","protocol","and","is","Hashable",".","It","also","supports","dot-notation","for","element","access",".","Random","access","and","insert","is","log32","(","n",")","where","n","is","the","size","of","the","map",".","The","following","are","examples","of","some","common","operations","on","persistent","maps",">",">",">","m1","=","m","(","a=1",",","b=3",")",">",">",">","m2","=","m1.set","(","'","c","'",",","3",")",">",">",">","m3","=","m2.remove","(","'","a","'",")",">",">",">","m1","pmap","(","{","'","a","'",":","1",",","'","b","'",":","3","}",")",">",">",">","m2","pmap","(","{","'","a","'",":","1",",","'","c","'",":","3",",","'","b","'",":","3","}",")",">",">",">","m3","pmap","(","{","'","c","'",":","3",",","'","b","'",":","3","}",")",">",">",">","m3","[","'","c","'","]","3",">",">",">","m3.c","3"]
docstr: Create a new evolver for this pmap. For a discussion on evolvers in general see the
  documentation for the pvector evolver.
  
  Create the evolver and perform various mutating updates to it:
  
  >>> m1 = m(a=1, b=2)
  >>> e = m1.evolver()
  >>> e['c'] = 3
  >>> len(e)
  3
  >>> del e['a']
  
  The underlying pmap remains the same:
  
  >>> m1
  pmap({'a': 1, 'b': 2})
  
  The changes are kept in the evolver. An updated pmap can be created using the
  persistent() function on the evolver.
  
  >>> m2 = e.persistent()
  >>> m2
  pmap({'c': 3, 'b': 2})
  
  The new pmap will share data with the original pmap in the same way that would have
  been done if only using operations on the pmap.
docstr_tok: ["Create","a","new","evolver","for","this","pmap",".","For","a","discussion","on","evolvers","in","general","see","the","documentation","for","the","pvector","evolver",".","Create","the","evolver","and","perform","various","mutating","updates","to","it",":",">",">",">","m1","=","m","(","a=1",",","b=2",")",">",">",">","e","=","m1.evolver","(",")",">",">",">","e","[","'","c","'","]","=","3",">",">",">","len","(","e",")","3",">",">",">","del","e","[","'","a","'","]","The","underlying","pmap","remains","the","same",":",">",">",">","m1","pmap","(","{","'","a","'",":","1",",","'","b","'",":","2","}",")","The","changes","are","kept","in","the","evolver",".","An","updated","pmap","can","be","created","using","the","persistent","(",")","function","on","the","evolver",".",">",">",">","m2","=","e.persistent","(",")",">",">",">","m2","pmap","(","{","'","c","'",":","3",",","'","b","'",":","2","}",")","The","new","pmap","will","share","data","with","the","original","pmap","in","the","same","way","that","would","have","been","done","if","only","using","operations","on","the","pmap","."]
code: def evolver(self):
      """
      Create a new evolver for this pmap. For a discussion on evolvers in general see the
      documentation for the pvector evolver.
  
      Create the evolver and perform various mutating updates to it:
  
      >>> m1 = m(a=1, b=2)
      >>> e = m1.evolver()
      >>> e['c'] = 3
      >>> len(e)
      3
      >>> del e['a']
  
      The underlying pmap remains the same:
  
      >>> m1
      pmap({'a': 1, 'b': 2})
  
      The changes are kept in the evolver. An updated pmap can be created using the
      persistent() function on the evolver.
  
      >>> m2 = e.persistent()
      >>> m2
      pmap({'c': 3, 'b': 2})
  
      The new pmap will share data with the original pmap in the same way that would have
      been done if only using operations on the pmap.
      """
      return self._Evolver(self)
  
imports: from ._compat import Mapping, Hashable
  from itertools import chain
  import six
  from pyrsistent._pvector import pvector
  from pyrsistent._transformations import transform
label_desc: Use image node_id 30 for calling the PMap obj's underlying member method code with example usage: obj.evolver() and returns: self