From 9e3282808a29e57c184c247866656be09771ce3d Mon Sep 17 00:00:00 2001 From: necoro <> Date: Sun, 24 Sep 2006 19:00:22 +0000 Subject: Some more documentation --- geneticone/helper.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'geneticone/helper.py') diff --git a/geneticone/helper.py b/geneticone/helper.py index e97568b..a8e55b1 100644 --- a/geneticone/helper.py +++ b/geneticone/helper.py @@ -22,24 +22,36 @@ import portage from portage_util import unique_array class BlockedException (Exception): + """An exception marking, that some package is blocking another one.""" pass class PackageNotFoundException (Exception): + """An exception marking that a package could not be found.""" pass class DependencyCalcError (Exception): + """An error occured during dependency calculation.""" pass def find_lambda (name): - """Returns the function needed by all the find_all_*-functions. Returns None if no name is given.""" + """Returns the function needed by all the find_all_*-functions. Returns None if no name is given. + @param name: name to build the function of + @type name: string + @returns: + 1. None if no name is given + 2. a lambda function + @rtype: function""" if name != None: return lambda x: re.match(".*"+name+".*",x) else: return lambda x: True def geneticize_list (list_of_packages): - '''to convert the output of each gentoolkit helper function is a list of *geneticone* Package objects - ''' + """Convertes a list of gentoolkit.Packages into L{geneticone.Packages}. + @param list_of_packages: the list of packages + @type list_of_packages: list of gentoolkit.Packages + @returns: converted list + @rtype: list of geneticone.Packages""" return [geneticone.Package(x) for x in list_of_packages] def find_best_match (search_key, only_installed = False): -- cgit v1.2.3-54-g00ecf