[Python-Dev] PEP 572: Assignment Expressions (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Wed Apr 18 18:46:41 EDT 2018


Agreed with Paul and Steve. A lot of work seems to have gone into the PEP (congratulations for that), but still the feature brings little to no additional power to the language while making it more complex.

-1 from me.

Regards

Antoine.

On Tue, 17 Apr 2018 06:55:58 -0700 Steve Dower <steve.dower at python.org> wrote:

Agree with Paul. The PEP is well thought out and well presented, but I really don’t think we need this in Python (and I say this as someone who uses it regularly in C/C#).

-1 on the idea; no disrespect intended toward to people who did a lot of work on it. Top-posted from my Windows phone From: Paul Moore Sent: Tuesday, April 17, 2018 6:31 To: David Mertz Cc: Nick Coghlan; Python-Dev Subject: Re: [Python-Dev] PEP 572: Assignment Expressions On 17 April 2018 at 14:07, Paul Moore <p.f.moore at gmail.com> wrote: > On 17 April 2018 at 14:01, David Mertz <mertz at gnosis.cx> wrote: >> Strongly agree with Nick that only simple name targets should be permitted >> (at least initially). NONE of the motivating cases use more complex targets, >> and allowing them encourages obscurity and code golf. > > I also agree. Originally I would have said why not allow them, it's a > potentially useful generalisation. But Nick's examples pretty clearly > demonstrate that there are a lot of unclear edge cases involved, and > even though "prevent people writing ugly code" is explicitly stated as > a non-goal in the PEP, that doesn't mean it's OK to allow an obvious > bug magnet with no clear use cases. I should also point out that I remain -0 on this proposal (I'd already said this on python-ideas, but I should probably repeat it here). For me, the use cases are mostly marginal, and the major disadvantage is in having two forms of assignment. Explaining to a beginner why we use a := b in an expression, but a = b in a statement is going to be a challenge. The fact that the PEP needs a section covering all the style guide warnings we feel are needed seems like it's a warning bell, too. Paul


Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/steve.dower%40python.org



More information about the Python-Dev mailing list