mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-04-17 07:30:08 +00:00
Updated Debugging Optimized Code (markdown)
parent
c13d2d99f4
commit
5bcf113aa8
@ -37,10 +37,10 @@ I believe that if you just present the code just the way the computer sees it, a
|
||||
As an example, in Python when I deparse:
|
||||
|
||||
```python
|
||||
if x:
|
||||
return x
|
||||
else:
|
||||
return f(x)
|
||||
if x:
|
||||
return x
|
||||
else:
|
||||
return f(x)
|
||||
```
|
||||
|
||||
the deparser produces the equivalent form:
|
||||
@ -53,14 +53,14 @@ the deparser produces the equivalent form:
|
||||
You may decide that you like this formulation better. On the other had if you had:
|
||||
|
||||
```python
|
||||
JUMP_ABSOLUTE = 100
|
||||
...
|
||||
if op == JUMP_ABSOLUTE:
|
||||
JUMP_ABSOLUTE = 100
|
||||
...
|
||||
if op == JUMP_ABSOLUTE:
|
||||
```
|
||||
|
||||
And this deparses to:
|
||||
|
||||
```python
|
||||
if op == 100:
|
||||
if op == 100:
|
||||
```
|
||||
I'd probably stick with the longer form. But my point is that in either case, a programmer would be able to figure out what was going on without being told. And if you didn't have any tool, that's a process you might go through
|
||||
|
Loading…
x
Reference in New Issue
Block a user