InstructionBlock: Add get_operations and register_operations for lists of operations
Merge request reports
Activity
requested review from @tim.jammer
If we include #6 (closed) , do you think it makes sense to only have one RegisterInstruction function, that is overloaded to take either a list or a single Instruction? Same for the get function, one could supply index=None or index='all' to retrieve all instructions.I think this saves us from the problem that
registerInstruction
andregisterInstructions
read like the same function name at first glance.Right, good point. Yes, I am also fine with that. Maybe we should think about adding type annotations to the functions. Then it could be something like:
registerInstruction(self, instruction: Instruction | List[Instruction])
This also avoids type checkers going crazy. See also #7 (closed).
Edited by Simon Schwitanski I will post a PR for implementation of #6 (closed) and #7 (closed) "soon"mentioned in commit b3054538
mentioned in merge request !9 (merged)