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