diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-01 09:25:21 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-01 09:25:21 (GMT) |
commit | 720b8c9dd7e0d8f7e9a879cb3a2669db9eb506e1 (patch) | |
tree | ca0e25df5c5f3a4e1e9aa5e2003a2595c74eb071 /Lib/sre_constants.py | |
parent | fb028336f9ee741d044b172d49780ce6e1706a42 (diff) | |
download | cpython-720b8c9dd7e0d8f7e9a879cb3a2669db9eb506e1.zip cpython-720b8c9dd7e0d8f7e9a879cb3a2669db9eb506e1.tar.gz cpython-720b8c9dd7e0d8f7e9a879cb3a2669db9eb506e1.tar.bz2 |
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 bdea5e4..8b6bbfa 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): |