OpenQuizz
Une application de gestion des contenus pédagogiques
pyrsistent._pmap Namespace Reference

Data Structures

class  PMap
 

Functions

def pmap (initial={}, pre_size=0)
 
def m (**kwargs)
 

Function Documentation

◆ m()

def pyrsistent._pmap.m ( **  kwargs)
Creates a new persitent map. Inserts all key value arguments into the newly created map.

>>> m(a=13, b=14)
pmap({'b': 14, 'a': 13})

◆ pmap()

def pyrsistent._pmap.pmap (   initial = {},
  pre_size = 0 
)
Create new persistent map, inserts all elements in initial into the newly created map.
The optional argument pre_size may be used to specify an initial size of the underlying bucket vector. This
may have a positive performance impact in the cases where you know beforehand that a large number of elements
will be inserted into the map eventually since it will reduce the number of reallocations required.

>>> pmap({'a': 13, 'b': 14})
pmap({'b': 14, 'a': 13})