On Wed, Jul 4, 2018 at 7:37 AM, Serhiy Storchaka <storchaka at gmail.com> wrote: > I believe most Python users are not > professional programmers -- they are sysadmins, scientists, hobbyists and > kids -- [citation needed] > In particularly mutating and > non-mutating operations are separated. The assignment expression breaks > this. [citation needed] In terms of blending mutating and non-mutating operations, augmented assignment is far worse. Contrast: >>> x = 1 >>> y = x >>> x += 1 >>> a = [1] >>> b = a >>> a += [2] Assignment expressions do the exact same thing as assignment statements, but also allow you to keep using that value. There is nothing about mutation. (Unless you believe that assignment *itself* is mutation, in which case Python is definitely the wrong language for you.) ChrisA
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4