From: Georg Brandl Date: Fri, 27 Feb 2009 16:39:26 +0000 (+0000) Subject: #5363: fix cmpfiles() docs. Another instance where a prose description is twice as... X-Git-Tag: v2.7a1~1931 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee6361f7d8421ca91ef2199d24123fe34ad2ea6c;p=python #5363: fix cmpfiles() docs. Another instance where a prose description is twice as long as the code. --- diff --git a/Doc/library/filecmp.rst b/Doc/library/filecmp.rst index 3377d97436..11d74ba770 100644 --- a/Doc/library/filecmp.rst +++ b/Doc/library/filecmp.rst @@ -31,17 +31,24 @@ The :mod:`filecmp` module defines the following functions: .. function:: cmpfiles(dir1, dir2, common[, shallow]) - Returns three lists of file names: *match*, *mismatch*, *errors*. *match* - contains the list of files match in both directories, *mismatch* includes the - names of those that don't, and *errros* lists the names of files which could not - be compared. Files may be listed in *errors* because the user may lack - permission to read them or many other reasons, but always that the comparison - could not be done for some reason. - - The *common* parameter is a list of file names found in both directories. The - *shallow* parameter has the same meaning and default value as for + Compare the files in the two directories *dir1* and *dir2* whose names are + given by *common*. + + Returns three lists of file names: *match*, *mismatch*, + *errors*. *match* contains the list of files that match, *mismatch* contains + the names of those that don't, and *errors* lists the names of files which + could not be compared. Files are listed in *errors* if they don't exist in + one of the directories, the user lacks permission to read them or if the + comparison could not be done for some other reason. + + The *shallow* parameter has the same meaning and default value as for :func:`filecmp.cmp`. + For example, ``cmpfiles('a', 'b', ['c', 'd/e'])`` will compare ``a/c`` with + ``b/c`` and ``a/d/e`` with ``b/d/e``. ``'c'`` and ``'d/e'`` will each be in + one of the three returned lists. + + Example:: >>> import filecmp