|
OpenQuizz
Une application de gestion des contenus pédagogiques
|


Public Member Functions | |
| def | __new__ (cls, **kwargs) |
| def | set (self, *args, **kwargs) |
| def | evolver (self) |
| def | __repr__ (self) |
| def | create (cls, kwargs, _factory_fields=None, ignore_extra=False) |
| def | __reduce__ (self) |
| def | serialize (self, format=None) |
Public Member Functions inherited from PMap | |
| def | __new__ (cls, size, buckets) |
| def | __getitem__ (self, key) |
| def | __contains__ (self, key) |
| def | __iter__ (self) |
| def | __getattr__ (self, key) |
| def | iterkeys (self) |
| def | itervalues (self) |
| def | iteritems (self) |
| def | values (self) |
| def | keys (self) |
| def | items (self) |
| def | __len__ (self) |
| def | __eq__ (self, other) |
| def | __lt__ (self, other) |
| def | __str__ (self) |
| def | __hash__ (self) |
| def | set (self, key, val) |
| def | remove (self, key) |
| def | discard (self, key) |
| def | update (self, *maps) |
| def | update_with (self, update_fn, *maps) |
| def | __add__ (self, other) |
| def | transform (self, *transformations) |
| def | copy (self) |
Public Member Functions inherited from CheckedType | |
| def | create (cls, source_data, _factory_fields=None) |
Public Member Functions inherited from _PRecordMeta | |
| def | __new__ (mcs, name, bases, dct) |
Additional Inherited Members | |
Static Public Attributes inherited from PMap | |
| get | |
A PRecord is a PMap with a fixed set of specified fields. Records are declared as python classes inheriting from PRecord. Because it is a PMap it has full support for all Mapping methods such as iteration and element access using subscript notation. More documentation and examples of PRecord usage is available at https://github.com/tobgu/pyrsistent
| def __new__ | ( | cls, | |
| ** | kwargs | ||
| ) |
| def __reduce__ | ( | self | ) |
Reimplemented from PMap.
| def __repr__ | ( | self | ) |
Reimplemented from PMap.
| def create | ( | cls, | |
| kwargs, | |||
_factory_fields = None, |
|||
ignore_extra = False |
|||
| ) |
Factory method. Will create a new PRecord of the current type and assign the values
specified in kwargs.
:param ignore_extra: A boolean which when set to True will ignore any keys which appear in kwargs that are not
in the set of fields on the PRecord.
| def evolver | ( | self | ) |
Returns an evolver of this object.
Reimplemented from PMap.
| def serialize | ( | self, | |
format = None |
|||
| ) |
Serialize the current PRecord using custom serializer functions for fields where such have been supplied.
Reimplemented from CheckedType.
| def set | ( | self, | |
| * | args, | ||
| ** | kwargs | ||
| ) |
Set a field in the record. This set function differs slightly from that in the PMap class. First of all it accepts key-value pairs. Second it accepts multiple key-value pairs to perform one, atomic, update of multiple fields.