thautwarm <yaoxiansa...@gmail.com> added the comment:

If we could generate `LOAD_CONST` instructions for `assert` statements, any 
prospective dangers could be avoided.


```
from dis import dis
@dis
def f():
    assert x
    
  3           0 LOAD_GLOBAL              0 (x)
              2 POP_JUMP_IF_TRUE         8
              4 LOAD_GLOBAL              1 (AssertionError)
              6 RAISE_VARARGS            1
        >>    8 LOAD_CONST               0 (None)
             10 RETURN_VALUE
```

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34880>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to