Eric V. Smith <e...@trueblade.com> added the comment:
I think this is pretty clearly the intended semantics. In your first example, what do you propose "print(x)" would produce? Consider: if False and (x:=input()) != '': pass else: print(x) We cannot change the semantics to now call input(), or any function with side effects, just to do the assignment to x. ---------- nosy: +eric.smith _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43055> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com