mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Removed unused function linecol() (added in issue #22578 by mistake).
This commit is contained in:
parent
fb028336f9
commit
720b8c9dd7
1 changed files with 0 additions and 12 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue