←back to thread

2024 points randlet | 2 comments | | HN request time: 0s | source
Show context
password4321 ◴[] No.17515875[source]
>Now that PEP 572 is done, I don't ever want to have to fight so hard for a PEP and find that so many people despise my decisions.

PEP 572: Python assignment expressions has been accepted

https://news.ycombinator.com/item?id=17448439

replies(2): >>17518581 #>>17520692 #
ehsankia ◴[] No.17518581[source]
Is the final syntax := surrounded by parenthesis?
replies(1): >>17518604 #
1. hermitdev ◴[] No.17518604[source]
Yes
replies(1): >>17519854 #
2. int_19h ◴[] No.17519854[source]
If the PEP that's published is final, then it only requires parens in certain context to make things clearer, like on the right side of the assignment statement.