summaryrefslogtreecommitdiff
path: root/Lib/sre_constants.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-12-01 11:25:21 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2014-12-01 11:25:21 +0200
commit720b8c9dd7e0d8f7e9a879cb3a2669db9eb506e1 (patch)
treeca0e25df5c5f3a4e1e9aa5e2003a2595c74eb071 /Lib/sre_constants.py
parentfb028336f9ee741d044b172d49780ce6e1706a42 (diff)
downloadcpython-git-720b8c9dd7e0d8f7e9a879cb3a2669db9eb506e1.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.py12
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):