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

Method eol

Lib/_pyrepl/reader.py:457–467  ·  view source on GitHub ↗

Return the 0-based index of the line break following p most immediately. p defaults to self.pos.

(self, p: int | None = None)

Source from the content-addressed store, hash-verified

455 return p + 1
456
457 def eol(self, p: int | None = None) -> int:
458 """Return the 0-based index of the line break following p most
459 immediately.
460
461 p defaults to self.pos."""
462 if p is None:
463 p = self.pos
464 b = self.buffer
465 while p < len(b) and b[p] != "\n":
466 p += 1
467 return p
468
469 def max_column(self, y: int) -> int:
470 """Return the last x-offset for line y"""

Callers 3

doMethod · 0.80
doMethod · 0.80
doMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected