[Python-checkins] r57016 - doctools/trunk/Doc-26/library/re.rst doctools/trunk/Doc-26/library/stdtypes.rst
mark.summerfield
python-checkins at python.org
Tue Aug 14 13:07:10 CEST 2007
Author: mark.summerfield
Date: Tue Aug 14 13:07:09 2007
New Revision: 57016
Modified:
doctools/trunk/Doc-26/library/re.rst
doctools/trunk/Doc-26/library/stdtypes.rst
Log:
Made re (?iL..x) slightly clearer and fixed one or two other tiny details.
Modified: doctools/trunk/Doc-26/library/re.rst
==============================================================================
--- doctools/trunk/Doc-26/library/re.rst (original)
+++ doctools/trunk/Doc-26/library/re.rst Tue Aug 14 13:07:09 2007
@@ -195,12 +195,16 @@
currently supported extensions.
``(?iLmsux)``
- (One or more letters from the set ``'i'``, ``'L'``, ``'m'``, ``'s'``, ``'u'``,
- ``'x'``.) The group matches the empty string; the letters set the corresponding
- flags (:const:`re.I`, :const:`re.L`, :const:`re.M`, :const:`re.S`,
- :const:`re.U`, :const:`re.X`) for the entire regular expression. This is useful
- if you wish to include the flags as part of the regular expression, instead of
- passing a *flag* argument to the :func:`compile` function.
+ (One or more letters from the set ``'i'``, ``'L'``, ``'m'``, ``'s'``,
+ ``'u'``, ``'x'``.) The group matches the empty string; the letters
+ set the corresponding flags: :const:`re.I` (ignore case),
+ :const:`re.L` (locale dependent), :const:`re.M` (multi-line),
+ :const:`re.S` (dot matches all), :const:`re.U` (Unicode dependent),
+ and :const:`re.X` (verbose), for the entire regular expression. (The
+ flags are described in :ref:`contents-of-module-re`.) This
+ is useful if you wish to include the flags as part of the regular
+ expression, instead of passing a *flag* argument to the
+ :func:`compile` function.
Note that the ``(?x)`` flag changes how the expression is parsed. It should be
used first in the expression string, or after one or more whitespace characters.
@@ -310,7 +314,7 @@
``\B``
Matches the empty string, but only when it is *not* at the beginning or end of a
- word. This is just the opposite of ``\ b``, so is also subject to the settings
+ word. This is just the opposite of ``\b``, so is also subject to the settings
of ``LOCALE`` and ``UNICODE``.
``\d``
Modified: doctools/trunk/Doc-26/library/stdtypes.rst
==============================================================================
--- doctools/trunk/Doc-26/library/stdtypes.rst (original)
+++ doctools/trunk/Doc-26/library/stdtypes.rst Tue Aug 14 13:07:09 2007
@@ -2291,7 +2291,7 @@
objects because they don't contain a reference to their global execution
environment. Code objects are returned by the built-in :func:`compile` function
and can be extracted from function objects through their :attr:`func_code`
-attribute.
+attribute. See also the :mod:`code` module.
.. index::
statement: exec
More information about the Python-checkins
mailing list