Matthieu Dartiailh

Results 147 comments of Matthieu Dartiailh

@iritkatriel if you to have a early look at the encoding of the exception table through pseudo-instruction at the Bytecode level feel free to do so.

Yes but I plan to work on it at one point by my current bandwidth for OSS is really low. So if you have the inclination to start something feel...

I am going to start working on this slowly and post here about my progress. The first topic I looked into is the new exception table feature. Basically it means...

The exception table is just a bunch of bytes as described in the linked file. So yes we will be able to create it from Python. Regarding you second point,...

No currently the instruction do not store their offset so it is lost. What is your use case for the offset ?

What concerns me is that as soon as you are going to modify the bytecode the offset won't be valid anymore, which means that the offsets would have to be...

In that case could you use dis to get the offset ? and do something like: ```python frozen_b = dis.Bytecode(f) editable_b = bytecode.bytecode(f) for frozen_i, editable_i in zip(frozen_b, editable_b): #...

If we expose such an attribute I am mostly worried that people may complain about the fact that this attribute becomes out of sync. But I may be over thinking...

Yes but we have to make it very clear in the documentation. Furthermore, we could provide methods on the bytecode to update the offset (and lineno) to the value they...

I agree with @SnoopyLane that offset makes sense only on ConcreteBytecode and as already mentioned I share his concern about this getting very easily out of scope. (As I mentioned...