(self, other)
| 237 | # XXXwrite that up. |
| 238 | # Note that M is of the form (T*)(S*) iff len(M.norm[0]) <= 1. |
| 239 | def less(self, other): |
| 240 | if self.n >= other.n: |
| 241 | return False |
| 242 | if self.is_simple and other.is_simple: |
| 243 | return self.nt <= other.nt |
| 244 | n = max(self.longest_run_of_spaces(), |
| 245 | other.longest_run_of_spaces()) + 1 |
| 246 | # the self.n >= other.n test already did it for ts=1 |
| 247 | for ts in range(2, n+1): |
| 248 | if self.indent_level(ts) >= other.indent_level(ts): |
| 249 | return False |
| 250 | return True |
| 251 | |
| 252 | # return a list of tuples (ts, i1, i2) such that |
| 253 | # i1 == self.indent_level(ts) >= other.indent_level(ts) == i2. |
no test coverage detected