python: update the docstring of class Filenames

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
This commit is contained in:
Justus Winter 2012-04-30 18:39:06 +02:00
parent 60e512d84f
commit 0803603cdd

View file

@ -32,14 +32,17 @@ from .errors import (
class Filenames(Python3StringMixIn): class Filenames(Python3StringMixIn):
"""Represents a list of filenames as returned by notmuch """Represents a list of filenames as returned by notmuch
This object contains the Filenames iterator. The main function is Objects of this class implement the iterator protocol.
as_generator() which will return a generator so we can do a Filenamesth an
iterator over a list of notmuch filenames. Do note that the underlying .. note::
library only provides a one-time iterator (it cannot reset the iterator to
the start). Thus iterating over the function will "exhaust" the list of The underlying library only provides a one-time iterator (it
tags, and a subsequent iteration attempt will raise a cannot reset the iterator to the start). Thus iterating over
:exc:`NotInitializedError`. Also note, that any function that uses the function will "exhaust" the list of tags, and a subsequent
iteration (nearly all) will also exhaust the tags. So both:: iteration attempt will raise a
:exc:`NotInitializedError`. Also note, that any function that
uses iteration (nearly all) will also exhaust the tags. So
both::
for name in filenames: print name for name in filenames: print name
@ -53,8 +56,8 @@ class Filenames(Python3StringMixIn):
print(str(filenames)) print(str(filenames))
will "exhaust" the Filenames. However, you can use will "exhaust" the Filenames. However, you can use
:meth:`Message.get_filenames` repeatedly to get fresh Filenames :meth:`Message.get_filenames` repeatedly to get fresh
objects to perform various actions on filenames. Filenames objects to perform various actions on filenames.
""" """
#notmuch_filenames_get #notmuch_filenames_get