Ezio Melotti avatar Ezio Melotti committed 9daf884

Merged revisions 75039 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
r75039 | ezio.melotti | 2009-09-24 00:36:39 +0300 (Thu, 24 Sep 2009) | 1 line

improved phrasing, markup and example
........

Comments (0)

Files changed (1)

Doc/library/fnmatch.rst

 
 .. function:: fnmatch(filename, pattern)
 
-   Test whether the *filename* string matches the *pattern* string, returning true
-   or false.  If the operating system is case-insensitive, then both parameters
-   will be normalized to all lower- or upper-case before the comparison is
-   performed.  If you require a case-sensitive comparison regardless of whether
-   that's standard for your operating system, use :func:`fnmatchcase` instead.
+   Test whether the *filename* string matches the *pattern* string, returning
+   :const:`True` or :const:`False`.  If the operating system is case-insensitive,
+   then both parameters will be normalized to all lower- or upper-case before
+   the comparison is performed.  :func:`fnmatchcase` can be used to perform a
+   case-sensitive comparison, regardless of whether that's standard for the
+   operating system.
 
    This example will print all file names in the current directory with the
    extension ``.txt``::
 
 .. function:: fnmatchcase(filename, pattern)
 
-   Test whether *filename* matches *pattern*, returning true or false; the
-   comparison is case-sensitive.
+   Test whether *filename* matches *pattern*, returning :const:`True` or
+   :const:`False`; the comparison is case-sensitive.
 
 
 .. function:: filter(names, pattern)
       >>> regex
       '.*\\.txt$'
       >>> reobj = re.compile(regex)
-      >>> print reobj.match('foobar.txt')
+      >>> reobj.match('foobar.txt')
       <_sre.SRE_Match object at 0x...>
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.