New submission from Martin Häcker <spamfaen...@gmx.de>:

When calling repr() on a compiled regex pattern like this:

> import re
> repr(re.compile('foo'))

you don't get the pattern of the regex out of the compiled form. Also all my 
research has shown no getter to allow this.

I noticed this in my application because I was unable to show good error 
messages for things involving regexes, which is a shame.

So please add the actual regex to the repr() form of the compiled regex, or 
alternatively provide a getter / property to get at it.

----------
messages: 149382
nosy: dwt
priority: normal
severity: normal
status: open
title: repr(regex) doesn't include actual regex
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13592>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to