Return the sequence of operations that results from applying the operation `op` to instances of the given classes.
(op, *classes)
| 308 | self.logger(*args) |
| 309 | |
| 310 | def op_sequence(op, *classes): |
| 311 | """Return the sequence of operations that results from applying |
| 312 | the operation `op` to instances of the given classes.""" |
| 313 | log = [] |
| 314 | instances = [] |
| 315 | for c in classes: |
| 316 | instances.append(c(log.append)) |
| 317 | |
| 318 | try: |
| 319 | op(*instances) |
| 320 | except TypeError: |
| 321 | pass |
| 322 | return log |
| 323 | |
| 324 | class A(OperationLogger): |
| 325 | def __eq__(self, other): |
no test coverage detected