[issue16619] LOAD_GLOBAL used to load `None` under certain circumstances

Bruno Dupuis report at bugs.python.org
Wed Dec 5 21:59:26 CET 2012


Bruno Dupuis added the comment:

To me, the whole issue is at line ~ 480 in peehole.c in the LOAD_NAME/LOAD_GLOBAL switch case.

This explains the difference between `return` and `return None` as the former is actually compiled to LOAD_CONST. OTOH, `return None` has to pass the optim pass to be changed in LOAD_CONST. The real bug is sometime it doesn't.

----------

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


More information about the Python-bugs-list mailing list