MCPcopy Index your code
hub / github.com/RustPython/RustPython / op_sequence

Function op_sequence

Lib/test/test_binop.py:310–322  ·  view source on GitHub ↗

Return the sequence of operations that results from applying the operation `op` to instances of the given classes.

(op, *classes)

Source from the content-addressed store, hash-verified

308 self.logger(*args)
309
310def 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
324class A(OperationLogger):
325 def __eq__(self, other):

Callers 1

Calls 2

cClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected