[issue40984] re.compile's repr truncates patterns at 200 characters

Quentin Wenger report at bugs.python.org
Tue Jun 16 09:06:47 EDT 2020


Quentin Wenger <wenger.quentin at bluewin.ch> added the comment:

I welcome any counter-example to the eval()'able property in the stdlib.

I do believe in this rule as hard and fast, because it works for small patterns, only bitting you when you grow, probably programmatically (so exactly when you actually could need the repr).

Furthermore, 200 seems very low anyway by today standards. I mean, if you want a repr in the first place, then chances are that you want it full if (reasonably) possible.

If a string repr's itself fully no matter what, why should re.compile arbitrarily decide to truncate its argument?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40984>
_______________________________________


More information about the Python-bugs-list mailing list