[issue28131] assert statements missed when loaded by zipimporter

Gregory P. Smith report at bugs.python.org
Tue Sep 13 18:31:07 EDT 2016


Gregory P. Smith added the comment:

from the zip:

>>> dis.dis(mod.test)
  3           0 LOAD_GLOBAL              0 (print)
              2 LOAD_FAST                0 (val)
              4 CALL_FUNCTION            1
              6 POP_TOP
              8 LOAD_CONST               0 (None)
             10 RETURN_VALUE

from the filesystem:
>>> dis.dis(mod.test)
  2           0 LOAD_FAST                0 (val)
              2 POP_JUMP_IF_TRUE         8
              4 LOAD_GLOBAL              0 (AssertionError)
              6 RAISE_VARARGS            1

  3     >>    8 LOAD_GLOBAL              1 (print)
             10 LOAD_FAST                0 (val)
             12 CALL_FUNCTION            1
             14 POP_TOP
             16 LOAD_CONST               0 (None)
             18 RETURN_VALUE

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28131>
_______________________________________


More information about the Python-bugs-list mailing list