[Python-checkins] r74365 - python/trunk/Doc/library/re.rst

georg.brandl python-checkins at python.org
Thu Aug 13 09:48:06 CEST 2009

Author: georg.brandl
Date: Thu Aug 13 09:48:05 2009
New Revision: 74365

#6679: Remove mention that sub supports no flags.


Modified: python/trunk/Doc/library/re.rst
--- python/trunk/Doc/library/re.rst	(original)
+++ python/trunk/Doc/library/re.rst	Thu Aug 13 09:48:05 2009
@@ -635,9 +635,7 @@
       >>> re.sub(r'\sAND\s', ' & ', 'Baked Beans And Spam', flags=re.IGNORECASE)
       'Baked Beans & Spam'
-   The pattern may be a string or an RE object; if you need to specify regular
-   expression flags, you must use a RE object, or use embedded modifiers in a
-   pattern; for example, ``sub("(?i)b+", "x", "bbbb BBBB")`` returns ``'x x'``.
+   The pattern may be a string or an RE object.
    The optional argument *count* is the maximum number of pattern occurrences to be
    replaced; *count* must be a non-negative integer.  If omitted or zero, all

More information about the Python-checkins mailing list