Does this position occur before p
? The two positions are assumed
to refer to the same source.
Does this position occur before p
? The two positions are assumed
to refer to the same source. False is returned if one of the
positions is invalid.
Does this position occur no later than p
? The two positions
are assumed to refer to the same source.
Does this position occur no later than p
? The two positions
are assumed to refer to the same source. False is returned if one
of the positions is invalid.
Does this position occur between two other positions, in the same source, inclusive of start position and exclusive of finish position?
Format this position.
Format this position. The result is of the form /foo/bar.txt:2:10:
if
a source is associated with the position and the source has a name, or
of the form 2:10:
otherwise. In each case the numbers are line followed
by column.
Apply a binary Boolean operation to this position and another one, as offsets, return the result.
Turn this position into a string that summarises the context of the input referred to by the position.
Turn this position into a string that summarises the context of the input
referred to by the position. If the position has a source that provides
access to its lines then the context is the line containing the position
followed by a line containing a caret pointer. Otherwise, return None
.
Return the offset that this position refers to in its source.
Return the offset that this position refers to in its source. None
is returned if the position is not valid for its source.
Record of a source position at a particular line and column relative to a given source. The line and column numbers are one-indexed.