MCPcopy
hub / github.com/Nuitka/Nuitka / atLineNumber

Method atLineNumber

nuitka/SourceCodeReferences.py:110–122  ·  view source on GitHub ↗

Make a reference to the same file, but different line. Avoids useless copies, by returning same object if the line is the same.

(self, line)

Source from the content-addressed store, hash-verified

108 return self
109
110 def atLineNumber(self, line):
111 """Make a reference to the same file, but different line.
112
113 Avoids useless copies, by returning same object if the line is
114 the same.
115 """
116
117 assert type(line) is int, line
118
119 if self.line != line:
120 return self._clone(line)
121 else:
122 return self
123
124 def atColumnNumber(self, column):
125 assert type(column) is int, column

Callers 11

_buildWithNodeFunction · 0.80
_makeIteratorCreationFunction · 0.80
buildNodeFunction · 0.80
buildNodeListFunction · 0.80
buildNodeTupleFunction · 0.80
buildTryExceptionNodeFunction · 0.80
buildClassNodeFunction · 0.80

Calls 1

_cloneMethod · 0.95

Tested by

no test coverage detected