[issue17184] re.VERBOSE doesn't respect whitespace in '( ?Pfoo...)'

2013-02-15 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - re.VERBOSE whitespace behavior not completely documented
versions: +Python 3.2, Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17184
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17184] re.VERBOSE doesn't respect whitespace in '( ?Pfoo...)'

2013-02-11 Thread Roy Smith

New submission from Roy Smith:

# Python 2.7.3
# Ubuntu 12.04

import re
pattern = r( ?Pphrase.*)
regex = re.compile(pattern, re.VERBOSE)

The above raises an exception in re.compile():

Traceback (most recent call last):
  File ./try.py, line 6, in module
regex = re.compile(pattern, re.VERBOSE)
  File /home/roy/env/python/lib/python2.7/re.py, line 190, in compile
return _compile(pattern, flags)
  File /home/roy/env/python/lib/python2.7/re.py, line 242, in _compile
raise error, v # invalid expression
sre_constants.error: nothing to repeat

The problem appears to be that re.VERBOSE isn't ignoring the space after the 
(.

Maybe this is a duplicate of issue15606 ?

--
components: Library (Lib)
messages: 181927
nosy: roysmith
priority: normal
severity: normal
status: open
title: re.VERBOSE doesn't respect whitespace in '( ?Pfoo...)'
type: behavior
versions: Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17184
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17184] re.VERBOSE doesn't respect whitespace in '( ?Pfoo...)'

2013-02-11 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
components: +Regular Expressions
nosy: +ezio.melotti, mrabarnett

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17184
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17184] re.VERBOSE doesn't respect whitespace in '( ?Pfoo...)'

2013-02-11 Thread Matthew Barnett

Matthew Barnett added the comment:

It does look like a duplicate to me.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17184
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com