From 17b0dc6856855f2cd46d234357f0de584db2019e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 1 Apr 2010 19:55:13 +0200 Subject: python: Document every class, function, property. Finally, a complete reference to apt_pkg available via pydoc and __doc__ attributes. --- python/metaindex.cc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'python/metaindex.cc') diff --git a/python/metaindex.cc b/python/metaindex.cc index cb066980..66aa76fb 100644 --- a/python/metaindex.cc +++ b/python/metaindex.cc @@ -48,10 +48,13 @@ static PyObject *MetaIndexGetIndexFiles(PyObject *Self,void*) { } static PyGetSetDef MetaIndexGetSet[] = { - {"dist",MetaIndexGetDist}, - {"index_files",MetaIndexGetIndexFiles}, - {"is_trusted",MetaIndexGetIsTrusted}, - {"uri",MetaIndexGetURI}, + {"dist",MetaIndexGetDist,0,"The distribution, as a string."}, + {"index_files",MetaIndexGetIndexFiles,0, + "A list of all IndexFile objects associated with this meta index."}, + {"is_trusted",MetaIndexGetIsTrusted,0, + "A boolean value determining whether the file can be trusted."}, + {"uri",MetaIndexGetURI,0, + "The uri the meta index is located at."}, {} }; @@ -66,6 +69,12 @@ static PyObject *MetaIndexRepr(PyObject *Self) } #undef S + +static const char *metaindex_doc = + "Represent a meta index, i.e. a Release file. This class provides\n" + "some information about those release files, e.g. whether they\n" + "are signed or not."; + PyTypeObject PyMetaIndex_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) @@ -89,7 +98,7 @@ PyTypeObject PyMetaIndex_Type = 0, // tp_setattro 0, // tp_as_buffer Py_TPFLAGS_DEFAULT, // tp_flags - "apt_pkg.MetaIndex Object", // tp_doc + metaindex_doc, // tp_doc 0, // tp_traverse 0, // tp_clear 0, // tp_richcompare -- cgit v1.2.3