This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Multiple re.compile flags cause error
Type: Stage:
Components: Regular Expressions Versions: Python 2.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: niemeyer Nosy List: georg.brandl, ggenellina, niemeyer, saulspatz
Priority: normal Keywords:

Created on 2007-05-07 02:05 by saulspatz, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg31962 - (view) Author: Saul Spatz (saulspatz) Date: 2007-05-07 02:05
The documentation for re.compile() shows that multiple flags are allowed, but 

re.compile(r'.*', re.VERBOSE, re.DOTALL)

results in an error message that only two arguments are allowed and three were given.

I'm using python 2.5 with Windows XP Home edition.
msg31963 - (view) Author: Gabriel Genellina (ggenellina) Date: 2007-05-07 05:10
Multiple flags must be ORed together: re.compile(r'.*', re.VERBOSE | re.DOTALL)
From the re module documentation at http://docs.python.org/lib/node46.html: "Values can be any of the following variables, combined using bitwise OR (the | operator)." 

msg31964 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-05-07 08:35
Closing as invalid.
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 44938
2007-05-07 02:05:29saulspatzcreate