Tom Lynn <tl...@users.sourceforge.net> added the comment: I'm still unsure. I think this confusion does cause bugs in real-world code. Perhaps more prominence for \A and \Z in the docs? There's already a section comparing regexps starting '^' with match under "Matching vs Searching".
The problem is basically that ^ and $ have weird semantics but are better recognised than \A and \Z. Looking over the docs again I see that the docs for $ are still misleading, in a way that's related to this issue: foo matches both 'foo' and 'foobar', while the regular expression foo$ matches only 'foo'. "foo$ matches only 'foo' (out of 'foo' and 'foobar')" is the correct interpretation of that, but it's easy to read it as "foo$ means exact_match('foo')", which is the misconception I was hoping to put to rest with this (foo$ also matches the 'foo' part of 'foo\nbar', even with flags=0). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1708652> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com