by version_five · 4y ago · 0 comments
When I
disassemble this part using
the dis module, there is no
"semantic"
difference between two
different .pyc files from
your loop:
1 0 LOAD_NAME 0 (_m)
2 POP_TOP
4 LOAD_CONST 0 (None)
6 RETURN_VALUE
<conjectures>
This suggests that the
difference is some internal
implementation
detail of the marshalled
PyCode object which does not
affect its
execution semantics. I could
imagine that some kind of
string
internalisation algorithm is
resulting in
nondeterministic hashmap
entry numbers... or
something.
It goes on to show another minimal example where this happens. Is there some claim or specification that compilation will be deterministic?just guessing though, I'm a perl expert, not python.