[issue37269] Python 3.8b1 miscompiles conditional expressions containing __debug__

Marius Gedminas report at bugs.python.org
Thu Jun 13 14:56:04 EDT 2019


New submission from Marius Gedminas <marius at gedmin.as>:

Python 3.8 miscompiles the following code:

    $ cat /tmp/wat.py
    enable_debug = False

    if not enable_debug or not __debug__:
        print("you shall not pass!")

    $ python3.7 /tmp/wat.py
    you shall not pass!

    $ python3.8 /tmp/wat.py

(no output is produced.)

This is a distilled example from zope.traversing's codebase (https://github.com/zopefoundation/zope.traversing/issues/13).

----------
components: Interpreter Core
messages: 345533
nosy: mgedmin
priority: normal
severity: normal
status: open
title: Python 3.8b1 miscompiles conditional expressions containing __debug__
versions: Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37269>
_______________________________________


More information about the Python-bugs-list mailing list