summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2011-04-05 15:56:14 +0200
committerJulian Andres Klode <jak@debian.org>2011-04-05 15:56:14 +0200
commit6ae5009c6cfe56b66a22848f80eff6239245f1e7 (patch)
tree15cc1b2caec6196c0176d0c4581f4f438a05d28e /doc/source
parent1c6ecaa6776498d27bcce81fa769a677a587215a (diff)
downloadpython-apt-6ae5009c6cfe56b66a22848f80eff6239245f1e7.tar.gz
Introduce apt_pkg.Cache.groups and apt_pkg.Cache.group_count
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/library/apt_pkg.rst26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/source/library/apt_pkg.rst b/doc/source/library/apt_pkg.rst
index 74bba8db..22225aa4 100644
--- a/doc/source/library/apt_pkg.rst
+++ b/doc/source/library/apt_pkg.rst
@@ -95,6 +95,32 @@ Working with the cache
A list of all :class:`PackageFile` objects stored in the cache.
+ .. attribute:: group_count
+
+ The number of groups in the cache.
+
+ .. attribute:: groups
+
+ A sequence of :class:`Group` objects, implemented as a
+ :class:`GroupList` object.
+
+ .. class:: GroupList
+
+ A simple sequence-like object which only provides a length and
+ an implementation of ``__getitem__`` for accessing groups at
+ a certain index. Apart from being iterable, it can be used in
+ the following ways:
+
+ .. describe:: list[index]
+
+ Get the :class:`Group` object for the group at the position
+ given by *index* in the GroupList *list*.
+
+ .. describe:: len(list)
+
+ Return the length of the GroupList object *list*.
+
+
.. attribute:: is_multi_arch
An attribute determining whether the cache supports multi-arch.