Matthew Barnett added the comment: I prefer to include the line and column numbers if it's a multi-line pattern, not just if the line number is > 1.
BTW, it's shorter if you do this: self.colno = pos - pattern.rfind(newline, 0, pos) If there's no newline, .rfind will return -1. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22578> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com