See issue 17087: "Improve the repr for regular expression match objects". It was decided that it might be a bad idea to show the entire matched portion of the string because it could be very long, so it's shown truncated if necessary.
I think so, the current behavior is misleading 在2016年12月27 00时08分, "R. David Murray"<report@bugs.python.org>写道: R. David Murray added the comment: If it is truncated, should it end with '...' or [...]? ---------- nosy: +r.david.murray _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29074> _______________________________________
Probably "...", although we also have to consider that the matched portion could in fact not be truncated but just happen to end with "...", although that would be a rare occurrence.