2 ms·
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 l
by orangecat 7y ago
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-78e8ea3354eac632b8978306b0275826L1425 https://github.com/python/cpython/pull/8122/files#diff-78e8e...
- mixmastamyk 7y agoThe 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.