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)
| 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 |
no test coverage detected