OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, items=()) |
def | __getitem__ (self, key) |
def | __get__ (self, instance, owner=None) |
Data Fields | |
default | |
Dict with 2 special properties: On initiation, keys that are lists, sets or tuples are converted to multiple keys so accessing any one of the items in the original list-like object returns the matching value md = MethodDispatcher({("foo", "bar"):"baz"}) md["foo"] == "baz" A default value which can be set through the default attribute.
def __init__ | ( | self, | |
items = () |
|||
) |
def __get__ | ( | self, | |
instance, | |||
owner = None |
|||
) |
def __getitem__ | ( | self, | |
key | |||
) |
default |