Message 172819 - Python tracker (original) (raw)

Tim, my point is that if the MULTILINE flag happens to be turned on, '$' won't just match at the end of the string (or slice), it'll also match at a newline, so wrapping the pattern in (?:...)$ in that case could give the wrong answer, but wrapping it in (?:...)\Z would give the right answer.

This means Tim and Guido are right that a dedicated fullmatch() method is desireable.