New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP 572 assignment expressions #94
Comments
I'm up for adding this, BTW. Is the style of the project that we wait for Python 3 to have it, |
Ok, I've read the PEP and a bunch of Guido's comments. It's clear he wanted this to be much more The truth is := looks a LOT like +=, /=, and friends--augmented assignments. So I'm going to code |
Yup, that's right. Here's an example of how I did this for adding the nonlocal keyword: https://www.naftaliharris.com/blog/nonlocal/ |
Is Lib/compiler being ignored when adding Python 3 features? The docs appear to say it's |
We generally try to backport changes there as well.
…On Sat, Jul 14, 2018, 10:04 PM Andy Valencia ***@***.***> wrote:
Is Lib/compiler being ignored when adding Python 3 features? The docs
appear to say it's
deprecated as of 2.6 (and gone from 3). I can certainly update it if you
prefer.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#94 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABysKxzFQ8-ZzAsPJKLeL6-ZjlwB4VoRks5uGs1FgaJpZM4VNUKe>
.
|
Ok, will test that tomorrow. vandys/tauthon branch pep572 is fairly complete code (he says |
I'll tidy this up and resubmit. |
Oops, meant to wave off the PR, not the issue. Doh. This assertion failure points to a deeper issue, thus the PR withdrawal. Python has painted itself a = 1 And expect c == [2, 3] with a == 2 and b == 3. a = [1, 2] Which in Python gives you a == [1, 2, 3, 4]. So precedence is distinct for augmented assignment (though their result can still be used a = 1 with a == 2 and c == [2, 3]. |
We should definitely plan on supporting assignment expressions, PEP 572.
The fight for it was so ugly that I see Guido's stepping back from BDFL! :(
The text was updated successfully, but these errors were encountered: