New submission from Fatih Kilic <m...@fklc.dev>:
So, what I mean by unoptimized bytecode is, for example when you type `a = 10 * 10`, the resulting bytecode is the following: ``` LOAD_CONST 0 (100) STORE_NAME 0 (a) ... ``` However, when you type, `(a := 10 * 10) == None`, the resulting bytecode is the following: ``` LOAD_CONST 0 (10) LOAD_CONST 0 (10) BINARY_MULTIPLY DUP_TOP STORE_NAME 0 (a) ... ``` I don't know if this is intentional, but shouldn't the resulting bytecode be the following: ``` LOAD_CONST 0 (100) DUP_TOP STORE_NAME 0 (a) ... ``` ---------- components: Parser messages: 407610 nosy: FKLC, lys.nikolaou, pablogsal priority: normal severity: normal status: open title: Using walrus produces different/unoptimized bytecode type: behavior versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45974> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com