[issue16007] Improved Error message for failing re expressions

2016-10-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Since 3.5 (issue22578) the re.error exception has attributes that contain a 
pattern and the position of the error. Error message contains the position of 
the error. A pattern is not included in the error message for purpose: it can 
be too long. Usually the pattern is clear from the context, and you always can 
check the pattern attribute.

--
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Add additional attributes to re.error

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16007] Improved Error message for failing re expressions

2014-11-01 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16007] Improved Error message for failing re expressions

2014-09-18 Thread Mark Lawrence

Mark Lawrence added the comment:

The original try/except that leads to the raise does not exist in the latest 
3.5 code.  I'd be inclined to close this as "out of date" for compatibility 
reasons if nothing else.

--
nosy: +BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16007] Improved Error message for failing re expressions

2012-10-01 Thread Wael Al Jishi

Wael Al Jishi added the comment:

The attached file is very different to the current source, including the 
docstring. Is this from python 2.x?

--
nosy: +Wael.Al.Jishi

___
Python tracker 

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



[issue16007] Improved Error message for failing re expressions

2012-09-30 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> needs patch

___
Python tracker 

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



[issue16007] Improved Error message for failing re expressions

2012-09-23 Thread Ramchandra Apte

Ramchandra Apte added the comment:

> As this is my first contribution, please let me know if this is the correct 
> procedure to submit changes.

This is the correct procedure. http://docs.python.org/devguide/ (the Python 
Devlopment Guide) is a guide on how to contribute to Python.
Hope you enjoy your Python development experience!

--
nosy: +ramchandra.apte

___
Python tracker 

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



[issue16007] Improved Error message for failing re expressions

2012-09-23 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Please provide a patch in unified diff format.

--
nosy: +benjamin.peterson
versions: +Python 3.4 -Python 2.7

___
Python tracker 

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



[issue16007] Improved Error message for failing re expressions

2012-09-23 Thread Ling Li

New submission from Ling Li:

Hi,

I would like to make a small improvement to the exception raised when 
_compile() function fails with exception on line 245. 

Please see attached amended file. The line of code is amended from: 

raise error, v # invalid expression

to:

raise error, r'%s with pattern: %s' % (v, pattern) # invalid expression

As this is my first contribution, please let me know if this is the correct 
procedure to submit changes.

Kind regards,
Ling

--
components: Regular Expressions
files: re.py
messages: 171051
nosy: ezio.melotti, lingster, mrabarnett
priority: normal
severity: normal
status: open
title: Improved Error message for failing re expressions
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file27266/re.py

___
Python tracker 

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