New submission from Jan Češpivo <jan.cesp...@gmail.com>: Hi,
it should be useful if assignment expression works within assertion. For example (real use-case in tests): assert r := re.match(r"result is (\d+)", tested_text) assert int(r.group(1)) == expected_number I haven't found a mention about assertions in https://www.python.org/dev/peps/pep-0572/ so it isn't technically a bug but it might be omission (?). Thx! ---------- components: Interpreter Core messages: 374476 nosy: jan.cespivo priority: normal severity: normal status: open title: SyntaxError: assignment expression within assert type: behavior versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41417> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com