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

Data Structures

class  PBag
 

Functions

def b (*elements)
 
def pbag (elements)
 

Function Documentation

◆ b()

def pyrsistent._pbag.b ( elements)
Construct a persistent bag.

Takes an arbitrary number of arguments to insert into the new persistent
bag.

>>> b(1, 2, 3, 2)
pbag([1, 2, 2, 3])

◆ pbag()

def pyrsistent._pbag.pbag (   elements)
Convert an iterable to a persistent bag.

Takes an iterable with elements to insert.

>>> pbag([1, 2, 3, 2])
pbag([1, 2, 2, 3])