diff options
| author | Julian Andres Klode <jak@debian.org> | 2010-04-01 19:55:13 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2010-04-01 19:55:13 +0200 |
| commit | 17b0dc6856855f2cd46d234357f0de584db2019e (patch) | |
| tree | b17863d7e0c27290c98dc3f19846d44aab27666b /python/indexrecords.cc | |
| parent | c3d6edddcdcd40ff7477430a20a3e3be7e188963 (diff) | |
| download | python-apt-17b0dc6856855f2cd46d234357f0de584db2019e.tar.gz | |
python: Document every class, function, property.
Finally, a complete reference to apt_pkg available
via pydoc and __doc__ attributes.
Diffstat (limited to 'python/indexrecords.cc')
| -rw-r--r-- | python/indexrecords.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/python/indexrecords.cc b/python/indexrecords.cc index ac4a7c2e..c5ebcfbc 100644 --- a/python/indexrecords.cc +++ b/python/indexrecords.cc @@ -44,9 +44,11 @@ static PyObject *indexrecords_load(PyObject *self,PyObject *args) return HandleErrors(PyBool_FromLong(records->Load(filename))); } -static char *indexrecords_lookup_doc = "lookup(metakey)\n\n" - "Lookup the filename given by metakey, return a tuple (hash, size).\n" - "The hash part is a HashString() object."; +static char *indexrecords_lookup_doc = + "lookup(key: str) -> (HashString, int)\n\n" + "Lookup the filename given by 'key', return a tuple (hash, size),\n" + "whereas the first element 'hash' is an apt_pkg.HashString object\n" + "and the second element 'size' an int object."; static PyObject *indexrecords_lookup(PyObject *self,PyObject *args) { const char *keyname; @@ -74,15 +76,17 @@ static PyObject *indexrecords_get_dist(PyObject *self) static PyMethodDef indexrecords_methods[] = { {"load",indexrecords_load,METH_VARARGS, - "load(filename: str)\n\nLoad the file given by filename."}, + "load(filename: str)\n\n" + "Load the file given by filename."}, {"get_dist",(PyCFunction)indexrecords_get_dist,METH_NOARGS, - "get_dist() -> str\n\nReturn a distribution set in the release file."}, + "get_dist() -> str\n\n" + "Return a distribution set in the release file."}, {"lookup",indexrecords_lookup,METH_VARARGS,indexrecords_lookup_doc}, {} }; static char *indexrecords_doc = "IndexRecords()\n\n" - "Representation of a release file."; + "Representation of a Release file."; PyTypeObject PyIndexRecords_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "apt_pkg.IndexRecords", // tp_name |
