diff options
Diffstat (limited to 'dbus_bindings/containers.c')
-rw-r--r-- | dbus_bindings/containers.c | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/dbus_bindings/containers.c b/dbus_bindings/containers.c index e364f98..26f983b 100644 --- a/dbus_bindings/containers.c +++ b/dbus_bindings/containers.c @@ -33,6 +33,8 @@ /* Array ============================================================ */ PyDoc_STRVAR(Array_tp_doc, +"dbus.Array([iterable][, signature][, variant_level])\n" +"\n" "An array of similar items, implemented as a subtype of list.\n" "\n" "As currently implemented, an Array behaves just like a list, but\n" @@ -40,11 +42,7 @@ PyDoc_STRVAR(Array_tp_doc, "conversion of its items to D-Bus types is only done when it's sent in\n" "a Message. This might change in future so validation is done earlier.\n" "\n" -"Constructor::\n" -"\n" -" dbus.Array([iterable][, signature][, variant_level])\n" -"\n" -"``variant_level`` must be non-negative; the default is 0.\n" +":py:attr:`variant_level` must be non-negative; the default is 0.\n" "\n" "``signature`` is the D-Bus signature string for a single element of the\n" "array, or None. If not None it must represent a single complete type, the\n" @@ -53,13 +51,6 @@ PyDoc_STRVAR(Array_tp_doc, "\n" "If None (the default), when the Array is sent over\n" "D-Bus, the item signature will be guessed from the first element.\n" -"\n" -":IVariables:\n" -" `variant_level` : int\n" -" Indicates how many nested Variant containers this object\n" -" is contained in: if a message's wire format has a variant containing a\n" -" variant containing an array, this is represented in Python by an\n" -" Array with variant_level==2.\n" ); static struct PyMemberDef Array_tp_members[] = { @@ -68,8 +59,11 @@ static struct PyMemberDef Array_tp_members[] = { "instance)"}, {"variant_level", T_LONG, offsetof(DBusPyArray, variant_level), READONLY, - "The number of nested variants wrapping the real data. " - "0 if not in a variant."}, + "Indicates how many nested Variant containers this object\n" + "is contained in: if a message's wire format has a variant containing a\n" + "variant containing an array, this is represented in Python by an\n" + "Array with variant_level==2.\n" + }, {NULL}, }; @@ -265,6 +259,8 @@ PyTypeObject DBusPyArray_Type = { /* Dict ============================================================= */ PyDoc_STRVAR(Dict_tp_doc, +"dbus.Dictionary(mapping_or_iterable=(), signature=None, variant_level=0)\n" +"\n" "An mapping whose keys are similar and whose values are similar,\n" "implemented as a subtype of dict.\n" "\n" @@ -273,11 +269,7 @@ PyDoc_STRVAR(Dict_tp_doc, "conversion of its items to D-Bus types is only done when it's sent in\n" "a Message. This may change in future so validation is done earlier.\n" "\n" -"Constructor::\n" -"\n" -" Dictionary(mapping_or_iterable=(), signature=None, variant_level=0)\n" -"\n" -"``variant_level`` must be non-negative; the default is 0.\n" +":py:attr:`variant_level` must be non-negative; the default is 0.\n" "\n" "``signature`` is either a string or None. If a string, it must consist\n" "of exactly two complete type signatures, representing the 'key' type\n" @@ -288,13 +280,6 @@ PyDoc_STRVAR(Dict_tp_doc, "If it is None (the default), when the Dictionary is sent over\n" "D-Bus, the key and value signatures will be guessed from an arbitrary\n" "element of the Dictionary.\n" -"\n" -":IVariables:\n" -" `variant_level` : int\n" -" Indicates how many nested Variant containers this object\n" -" is contained in: if a message's wire format has a variant containing a\n" -" variant containing an array of DICT_ENTRY, this is represented in\n" -" Python by a Dictionary with variant_level==2.\n" ); static struct PyMemberDef Dict_tp_members[] = { @@ -303,8 +288,11 @@ static struct PyMemberDef Dict_tp_members[] = { "that of each value in this Dictionary, as a Signature instance."}, {"variant_level", T_LONG, offsetof(DBusPyDict, variant_level), READONLY, - "The number of nested variants wrapping the real data. " - "0 if not in a variant."}, + "Indicates how many nested Variant containers this object\n" + "is contained in: if a message's wire format has a variant containing a\n" + "variant containing a dictionary, this is represented in Python by a\n" + "Dictionary with variant_level==2.\n" + }, {NULL}, }; @@ -524,11 +512,9 @@ PyTypeObject DBusPyDict_Type = { static PyObject *struct_signatures; PyDoc_STRVAR(Struct_tp_doc, -"An structure containing items of possibly distinct types.\n" -"\n" -"Constructor::\n" +"dbus.Struct(iterable, signature=None, variant_level=0)\n" "\n" -" dbus.Struct(iterable, signature=None, variant_level=0) -> Struct\n" +"An structure containing items of possibly distinct types.\n" "\n" "D-Bus structs may not be empty, so the iterable argument is required and\n" "may not be an empty iterable.\n" @@ -540,10 +526,10 @@ PyDoc_STRVAR(Struct_tp_doc, "If the signature is None (default) it will be guessed\n" "from the types of the items during construction.\n" "\n" -"``variant_level`` must be non-negative; the default is 0.\n" +":py:attr:`variant_level` must be non-negative; the default is 0.\n" +"\n" +".. py:attribute:: variant_level\n" "\n" -":IVariables:\n" -" `variant_level` : int\n" " Indicates how many nested Variant containers this object\n" " is contained in: if a message's wire format has a variant containing a\n" " variant containing a struct, this is represented in Python by a\n" |