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

2020-06-16 Thread Quentin Wenger
Quentin Wenger 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 r

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

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Re-opening this because issue39949 is about match objects, not compiled re objects. Still, I don't think the repr "rule" about being eval-able is hard and fast. Although changing the repr to be in brackets wouldn't be unreasonable just to drive the point hom

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

2020-06-16 Thread Eric V. Smith
Eric V. Smith added the comment: Any change to the repr should take place on the other issue. I don't feel very strongly that the repr must be eval-able, but in any event it should be raised on issue39949 if you feel strongly about it. I do think it's reasonable to say that if the repr is tr

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

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: All in all, it is simply a matter of compliance. The doc of repr says that a repr is either - a string that can be eval()'ed back to (an equivalent of) the original object - or a "more loose" angle-bracket representation. re.compile with small patterns falls

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

2020-06-16 Thread Quentin Wenger
Quentin Wenger added the comment: Pardon me, but I see an important difference with the other bug report: that one is about a repr in angle brackets, and as such does not require an exact output, so an ellipsis is good enough. In this bug, the output of repr gives a string than can, at least

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

2020-06-16 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyt

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

2020-06-15 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: This seems similar to https://bugs.python.org/issue39949 -- nosy: +serhiy.storchaka, xtreak ___ Python tracker ___

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

2020-06-15 Thread Quentin Wenger
Change by Quentin Wenger : -- title: re.compile's repr truncates patterns at 199 characters -> re.compile's repr truncates patterns at 200 characters ___ Python tracker ___ __