diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-01 11:25:21 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-01 11:25:21 +0200 |
commit | 85346b59c7da1b1242e89beb2cbefa5dc235cf21 (patch) | |
tree | a6a88f1a47c02901477831671e909bbdd5eea564 /Lib/sre_constants.py | |
parent | 23722d1dfac1db121e526f34c470def38d8b74c5 (diff) | |
download | cpython-85346b59c7da1b1242e89beb2cbefa5dc235cf21.tar.gz |
Removed unused function linecol() (added in issue #22578 by mistake).
Diffstat (limited to 'Lib/sre_constants.py')
-rw-r--r-- | Lib/sre_constants.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py index bdea5e42b4..8b6bbfaaf3 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): |