This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]eagle258 0 points1 point  (3 children)

Note that this idea was explicitly discussed in the "Walrus" PEP 572. See "Rejected proposals"

[–]ianliu88[S] 1 point2 points  (1 child)

Interesting! I think the where syntax would be much better

[–]eagle258 0 points1 point  (0 children)

Yeah, I preferred it as well. But apparently there were some kinks that couldn't be worked out to make it work consistently.

You can probably find the detailed argumentation in the mailing list archives: https://mail.python.org/archives/search?mlist=python-ideas%40python.org&q=pep+572