Message374476
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! |
|
Date |
User |
Action |
Args |
2020-07-28 07:59:38 | jan.cespivo | set | recipients:
+ jan.cespivo |
2020-07-28 07:59:37 | jan.cespivo | set | messageid: <1595923177.97.0.806397891633.issue41417@roundup.psfhosted.org> |
2020-07-28 07:59:37 | jan.cespivo | link | issue41417 messages |
2020-07-28 07:59:37 | jan.cespivo | create | |
|