From: Serhiy Storchaka Date: Mon, 1 Dec 2014 09:25:21 +0000 (+0200) Subject: Removed unused function linecol() (added in issue #22578 by mistake). X-Git-Tag: v3.5.0a1~404 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=720b8c9dd7e0d8f7e9a879cb3a2669db9eb506e1;p=thirdparty%2FPython%2Fcpython.git Removed unused function linecol() (added in issue #22578 by mistake). --- diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py index bdea5e42b48f..8b6bbfaaf36d 100644 --- a/Lib/sre_constants.py +++ b/Lib/sre_constants.py @@ -39,18 +39,6 @@ class error(Exception): self.lineno = self.colno = None super().__init__(msg) -def linecol(doc, pos): - if isinstance(pattern, str): - newline = '\n' - else: - newline = b'\n' - lineno = pattern.count(newline, 0, pos) + 1 - if lineno == 1: - colno = pos + 1 - else: - colno = pos - doc.rindex(newline, 0, pos) - return lineno, colno - class _NamedIntConstant(int): def __new__(cls, value, name):