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


Public Member Functions | |
| def | __new__ (cls, id_attr, prefix='') |
| def | __init__ (self, id_attr, prefix='') |
| def | __contains__ (self, attr) |
| def | __getattr__ (self, attr) |
| def | __getitem__ (self, index) |
| def | __delitem__ (self, index) |
List of iterable objects allowing to query an object by id or by named index:: heads = repo.heads heads.master heads['master'] heads[0] It requires an id_attribute name to be set which will be queried from its contained items to have a means for comparison. A prefix can be specified which is to be used in case the id returned by the items always contains a prefix that does not matter to the user, so it can be left out.
| def __init__ | ( | self, | |
| id_attr, | |||
prefix = '' |
|||
| ) |
| def __contains__ | ( | self, | |
| attr | |||
| ) |
| def __delitem__ | ( | self, | |
| index | |||
| ) |
| def __getattr__ | ( | self, | |
| attr | |||
| ) |
| def __getitem__ | ( | self, | |
| index | |||
| ) |
| def __new__ | ( | cls, | |
| id_attr, | |||
prefix = '' |
|||
| ) |