A list which checks if it contains a call which may have an argument of ANY, flipping the components of item and self from their traditional locations so that ANY is guaranteed to be on the left.
| 1119 | |
| 1120 | |
| 1121 | class _AnyComparer(list): |
| 1122 | """A list which checks if it contains a call which may have an |
| 1123 | argument of ANY, flipping the components of item and self from |
| 1124 | their traditional locations so that ANY is guaranteed to be on |
| 1125 | the left.""" |
| 1126 | def __contains__(self, item): |
| 1127 | for _call in self: |
| 1128 | assert len(item) == len(_call) |
| 1129 | if all([ |
| 1130 | expected == actual |
| 1131 | for expected, actual in zip(item, _call) |
| 1132 | ]): |
| 1133 | return True |
| 1134 | return False |
| 1135 | |
| 1136 | |
| 1137 | def _try_iter(obj): |
no outgoing calls
no test coverage detected
searching dependent graphs…