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
commit85346b59c7da1b1242e89beb2cbefa5dc235cf21 (patch)
treea6a88f1a47c02901477831671e909bbdd5eea564 /Lib/sre_constants.py
parent23722d1dfac1db121e526f34c470def38d8b74c5 (diff)
downloadcpython-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.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):