New submission from Alexander Belopolsky <[EMAIL PROTECTED]>: Before:
>>> dis(lambda:+2) 1 0 LOAD_CONST 0 (2) 3 UNARY_POSITIVE 4 RETURN_VALUE >>> dis(lambda:not 2) 1 0 LOAD_CONST 0 (2) 3 UNARY_NOT 4 RETURN_VALUE After: >>> dis(lambda:+2) 1 0 LOAD_CONST 1 (2) 3 RETURN_VALUE >>> dis(lambda:not 2) 1 0 LOAD_CONST 1 (False) 3 RETURN_VALUE ---------- components: Interpreter Core files: fold-unary.diff keywords: patch messages: 64613 nosy: belopolsky severity: normal status: open title: Fold unary + and not on constants type: resource usage versions: Python 2.6 Added file: http://bugs.python.org/file9880/fold-unary.diff __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2499> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com