[Python-checkins] cpython (3.2): Closes #14250: regex.flags has not only explicit flags but also implicit flags

georg.brandl python-checkins at python.org
Sat Mar 17 17:29:44 CET 2012


http://hg.python.org/cpython/rev/b3b3a4a7d7b2
changeset:   75789:b3b3a4a7d7b2
branch:      3.2
parent:      75785:6cf5f963e0c4
user:        Georg Brandl <georg at python.org>
date:        Sat Mar 17 17:29:27 2012 +0100
summary:
  Closes #14250: regex.flags has not only explicit flags but also implicit flags and those from the pattern

files:
  Doc/library/re.rst |  5 +++--
  1 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/Doc/library/re.rst b/Doc/library/re.rst
--- a/Doc/library/re.rst
+++ b/Doc/library/re.rst
@@ -784,8 +784,9 @@
 
 .. attribute:: regex.flags
 
-   The flags argument used when the RE object was compiled, or ``0`` if no flags
-   were provided.
+   The regex matching flags.  This is a combination of the flags given to
+   :func:`.compile`, any ``(?...)`` inline flags in the pattern, and implicit
+   flags such as :data:`UNICODE` if the pattern is a Unicode string.
 
 
 .. attribute:: regex.groups

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list