Better HN
topnewbestaskshowjobs
Log inSign up

gbfowler

10 karma · joined Jul 3, 2018 (8y ago) · 1 submissions

Submissions

comment 8y ago · link · parent

It is not syntactic sugar, "x := 10" is an assignment expression in contrast with "x = 10", which is a statement.

Hence the former can be used in contexts like "if x := 10: pass", which is the whole point of the PEP.