[Python-checkins] cpython: Removed unused function linecol() (added in issue #22578 by mistake).
serhiy.storchaka
python-checkins at python.org
Mon Dec 1 10:27:18 CET 2014
https://hg.python.org/cpython/rev/9711c60e3049
changeset: 93675:9711c60e3049
user: Serhiy Storchaka <storchaka at gmail.com>
date: Mon Dec 01 11:25:21 2014 +0200
summary:
Removed unused function linecol() (added in issue #22578 by mistake).
files:
Lib/sre_constants.py | 12 ------------
1 files changed, 0 insertions(+), 12 deletions(-)
diff --git a/Lib/sre_constants.py b/Lib/sre_constants.py
--- a/Lib/sre_constants.py
+++ b/Lib/sre_constants.py
@@ -39,18 +39,6 @@
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):
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list