←back to thread

2024 points randlet | 2 comments | | HN request time: 0.421s | source
Show context
AdmiralAsshat ◴[] No.17515876[source]
What was the issue that was evidently so contentious that it made him wish to step down?
replies(5): >>17515913 #>>17515941 #>>17515956 #>>17515958 #>>17515959 #
Analemma_ ◴[] No.17515959[source]
(a := b) rather than a = b

Naturally people went to the barricades for it, in a classic example of bikeshedding and Wadler's Law (programmers will fight to the death over trivial syntax disagreements and just shrug at profound changes to semantics and architecture)

replies(4): >>17516054 #>>17516202 #>>17516377 #>>17517585 #
1. settler4 ◴[] No.17516202[source]
> (a := b)

Will `with` start using this syntax instead of `b as a`: `with open('foo') as a:` == `with a := open('foo'):`?

Update: found my answer on the pep. `with EXPR as VAR` actually calls `EXPR.__enter__()` so it's not the same.

replies(1): >>17517635 #
2. thomasahle ◴[] No.17517635[source]
You mean `with EXPR as VAR` lets `VAR = EXPR.__enter__()`. Because `with EXPR` also calls `EXPR.__enter__()`, so `with VAR := EXPR` would too.

Seems very unnecessary to have both options.