[issue28100] Refactor error messages in symtable.c

Christian Heimes report at bugs.python.org
Wed Sep 21 10:56:00 EDT 2016


Christian Heimes added the comment:

Please rewrite the patch to use if / else if / else, e.g.

 if (cur & (DEF_LOCAL | USE | DEF_ANNOT)) {
    ...
    if (cur & USE) {
        msg = GLOBAL_AFTER_USE;
    } else if (cur & DEF_LOCAL) {
        msg = GLOBAL_AFTER_ASSIGN;
    } else {  /* DEF_ANNOT */
        msg = GLOBAL_ANNOT;
    }
    ...
}

----------

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


More information about the Python-bugs-list mailing list