Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple re.compile flags cause error #44938

Closed
saulspatz mannequin opened this issue May 7, 2007 · 3 comments
Closed

Multiple re.compile flags cause error #44938

saulspatz mannequin opened this issue May 7, 2007 · 3 comments

Comments

@saulspatz
Copy link
Mannequin

saulspatz mannequin commented May 7, 2007

BPO 1713999
Nosy @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2007-05-07.08:35:37.000>
created_at = <Date 2007-05-07.02:05:29.000>
labels = ['expert-regex', 'invalid']
title = 'Multiple re.compile flags cause error'
updated_at = <Date 2007-05-07.08:35:37.000>
user = 'https://bugs.python.org/saulspatz'

bugs.python.org fields:

activity = <Date 2007-05-07.08:35:37.000>
actor = 'georg.brandl'
assignee = 'niemeyer'
closed = True
closed_date = None
closer = None
components = ['Regular Expressions']
creation = <Date 2007-05-07.02:05:29.000>
creator = 'saulspatz'
dependencies = []
files = []
hgrepos = []
issue_num = 1713999
keywords = []
message_count = 3.0
messages = ['31962', '31963', '31964']
nosy_count = 4.0
nosy_names = ['georg.brandl', 'niemeyer', 'ggenellina', 'saulspatz']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1713999'
versions = ['Python 2.5']

@saulspatz
Copy link
Mannequin Author

saulspatz mannequin commented May 7, 2007

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.

@saulspatz saulspatz mannequin closed this as completed May 7, 2007
@saulspatz saulspatz mannequin added the invalid label May 7, 2007
@saulspatz saulspatz mannequin assigned niemeyer May 7, 2007
@saulspatz saulspatz mannequin added the topic-regex label May 7, 2007
@saulspatz saulspatz mannequin closed this as completed May 7, 2007
@saulspatz saulspatz mannequin added the invalid label May 7, 2007
@saulspatz saulspatz mannequin assigned niemeyer May 7, 2007
@saulspatz saulspatz mannequin added the topic-regex label May 7, 2007
@ggenellina
Copy link
Mannequin

ggenellina mannequin commented May 7, 2007

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)."

@birkenfeld
Copy link
Member

Closing as invalid.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant