Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> the walrus operator limits the variable's scope to the conditional

Nope! It's still function-scoped.

In Python, walrus or no walrus, the body of a conditional is never a separate scope.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: