[issue17087] Improve the repr for regular expression match objects

Claudiu.Popa report at bugs.python.org
Wed Oct 16 13:28:34 CEST 2013


Claudiu.Popa added the comment:

Added the new patch, which addresses Serhiy's comments.
Also, this approach fails when bytes are involved:

>>> import re
>>> re.search(b"a", b"a")
Assertion failed: (PyUnicode_Check(op)), function _PyUnicode_CheckConsistency, file Objects/unicodeobject.c, line 309.

Should a check be added for this also?

----------
Added file: http://bugs.python.org/file32143/sre_repr4.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17087>
_______________________________________


More information about the Python-bugs-list mailing list