You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a new AnyOparg enum & make Instruction + PseudoInstruction enums to not hold the oparg type.
Detailed Explanation
The current Instruction enum couples the opcode and its oparg type together. In practice, this creates friction and many boilerplate code that can be avoided.
Suggested API
New pure Opcode enum that will have only the mapping between the opcode name and it's ID, like this:
enumOpcode{Nop = 0,IsOp = 1,BinaryOp = 2,
...
}
A new AnyOparg enum that will have all oparg types as it's variants:
Activity
youknowone commentedon Jan 16, 2026
@coolreader18 I'd like to listen what was the rational to made current layout. And how do you think about the changes.
Python instruction changed a lot since 3.10. Probably this will be a good chance to research what's the best for next a few years