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

Victor Stinner made a demonstration pull request using the walrus operator in the standard library where it makes sense. On balance it removes several hundred lines and often makes the code much clearer, e.g. https://github.com/python/cpython/pull/8122/files#diff-78e8e...


The argument was about mostly about the syntax.

In the link above, the "as" keyword would work with (very close to) all of those lines and arguably more readable.




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

Search: