MCPcopy Index your code
hub / github.com/python/cpython / updatepos

Method updatepos

Lib/_markupbase.py:44–55  ·  view source on GitHub ↗
(self, i, j)

Source from the content-addressed store, hash-verified

42 # words the concatenation of all the input strings to this
43 # function should be exactly the entire input.
44 def updatepos(self, i, j):
45 if i >= j:
46 return j
47 rawdata = self.rawdata
48 nlines = rawdata.count("\n", i, j)
49 if nlines:
50 self.lineno = self.lineno + nlines
51 pos = rawdata.rindex("\n", i, j) # Should not fail
52 self.offset = j-(pos+1)
53 else:
54 self.offset = self.offset + j-i
55 return j
56
57 _decl_otherchars = ''
58

Callers 3

_parse_doctype_subsetMethod · 0.95
_scan_nameMethod · 0.95
goaheadMethod · 0.80

Calls 2

countMethod · 0.45
rindexMethod · 0.45

Tested by

no test coverage detected