Make Python MLIR Operation not iterable
The current behavior is conveniently allowing to iterate on the regions of an operation implicitly by exposing an operation as Iterable. However this is also error prone and code that may intend to iterate on the results or the operands could end up "working" apparently instead of throwing a runtime error. The lack of static type checking in Python contributes to the ambiguity here, it seems safer to not do this and require and explicit qualification to iterate (`op.results`, `op.regions`, ...). Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D111697
Loading
Please sign in to comment