Make a copy it itself but mark as internal code. Avoids useless copies, by returning an internal object again if it is already internal.
(self)
| 95 | return self.fromFilenameAndLine(filename=self.filename, line=line) |
| 96 | |
| 97 | def atInternal(self): |
| 98 | """Make a copy it itself but mark as internal code. |
| 99 | |
| 100 | Avoids useless copies, by returning an internal object again if |
| 101 | it is already internal. |
| 102 | """ |
| 103 | if not self.isInternal(): |
| 104 | result = self._clone(self.line) |
| 105 | |
| 106 | return result |
| 107 | else: |
| 108 | return self |
| 109 | |
| 110 | def atLineNumber(self, line): |
| 111 | """Make a reference to the same file, but different line. |
no test coverage detected