python3-pyrsistent – persistent/functional/immutable data structures for Python

Pyrsistent is a number of persistent collections (sometimes referred to as functional data structures). Persistent in the sense that they are immutable.

All methods on a data structure that would normally mutate it instead return a new copy of the structure containing the requested updates. The original structure is left untouched.

The collection types and key features currently implemented are:

  • PVector, similar to a python list
  • PMap, similar to dict
  • PSet, similar to set
  • PRecord, a PMap on steroids with fixed fields, optional type and invariant checking and much more
  • PClass, a Python class fixed fields, optional type and invariant checking and much more
  • Checked collections, PVector, PMap and PSet with optional type and invariance checks and more
  • PBag, similar to collections.Counter
  • PList, a classic singly linked list
  • PDeque, similar to collections.deque
  • Immutable object type (immutable) built on the named tuple
  • freeze and thaw functions to convert between pythons standard collections and pyrsistent collections.
  • Flexible transformations of arbitrarily complex structures built from PMaps and PVectors.
Package availability chart
Distribution Base version Our version Architectures
Debian GNU/Linux 10.0 (buster)   0.15.5-1~nd1~nd100+1 i386, amd64, ppc64el
Debian GNU/Linux 11.0 (bullseye) 0.15.5-1 0.15.5-1~nd1~nd110+1 i386, amd64
Debian testing (bookworm) 0.15.5-1    
Debian unstable (sid) 0.15.5-1 0.15.5-1~nd1~nd+1 i386, amd64
Ubuntu 18.04 “Bionic Beaver” (bionic)   0.15.5-1~nd1~nd18.04+1 i386, amd64
Ubuntu 20.04 “Focal Fossa” (focal) 0.15.5-1build1    
Ubuntu 21.04 “Hirsute Hippo” (hirsute) 0.15.5-1build3    
Ubuntu 21.10 “Impish Indri” (impish) 0.15.5-1build3    


blog comments powered by Disqus