Serhiy Storchaka added the comment: Sorry, I was wrong. The level argument is always non-negative integer (if a bytecode is not corrupted). The second branch can be just removed.
Following patch also fixes the validation of the ImportFrom AST node. ---------- nosy: +benjamin.peterson, georg.brandl, yselivanov stage: commit review -> patch review type: behavior -> enhancement versions: -Python 2.7, Python 3.5 Added file: http://bugs.python.org/file43545/import_name_level_2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27352> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com