On 14 November 2016 at 22:13, Mikhail V <mikhail...@gmail.com> wrote: >> we don't want A = A + 1 to be the same as A += 1 " > > This sounds quite frustrating for me, what else could this be but A += 1? > Would I want a copy with same name? How that will make sense?
>>> A = [1,2,3] >>> B = A >>> A = A + [1] >>> A [1, 2, 3, 1] >>> B [1, 2, 3] >>> A = [1,2,3] >>> B = A >>> A += [1] >>> A [1, 2, 3, 1] >>> B [1, 2, 3, 1] For a mutable class, A = A + something is fundamentally different from A += something. Before proposing fundamental changes to Python's semantics, please make sure that you at least understand those semantics first, and explain why your proposal is justified. There are a lot of people on this list, and the cumulative time spent reading your posts is therefore quite significant. You owe it to all those readers to ensure that your proposals are at least feasible *in the context of the Python language*. Paul _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/