diff Doc/library/string.rst @ 63295:91cbb55e20be

#6630: allow customizing flags for compiling string.Template.idpattern.
author Georg Brandl <georg@python.org>
date Thu, 29 Jul 2010 17:16:10 +0000
parents 20e56eccdf52
children e210ed63b04e
line wrap: on
line diff
--- a/Doc/library/string.rst	Thu Jul 29 16:26:56 2010 +0000
+++ b/Doc/library/string.rst	Thu Jul 29 17:16:10 2010 +0000
@@ -710,6 +710,14 @@
   appropriate).  The default value is the regular expression
   ``[_a-z][_a-z0-9]*``.
 
+* *flags* -- The regular expression flags that will be applied when compiling
+  the regular expression used for recognizing substitutions.  The default value
+  is ``re.IGNORECASE``.  Note that ``re.VERBOSE`` will always be added to the
+  flags, so custom *idpattern*\ s must follow conventions for verbose regular
+  expressions.
+
+  .. versionadded:: 3.2
+
 Alternatively, you can provide the entire regular expression pattern by
 overriding the class attribute *pattern*.  If you do this, the value must be a
 regular expression object with four named capturing groups.  The capturing