-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
async and await should be keywords in 3.7 #74591
Comments
According to PEP-492, async and await should be full keywords in Python 3.7, but this hasn't been implemented yet. I have a patch ready that I'll submit as a PR soon. |
+1 These words are here to stay. That said, Guido needs to explicitly sign-off on any new language keywords. |
Yes, I signed off on this when I approved that PEP. On May 19, 2017 20:10, "Raymond Hettinger" <report@bugs.python.org> wrote:
|
It's time to remove Yury's hacks from the parser and get a sane syntax ;-) I agree to make async and await real keywords! |
Thanks a lot, Jelle! |
According to PEP-492, async and await should have been deprecated in 3.5 and 3.6, but I don't think they have been : await = 1
def f(async=True):
... don't raise any deprecation warning in 3.6. Since version 3.7 will break existing code with a SyntaxError, could it be possible to have something explicit in the SyntaxError message for these new keywords, for instance SyntaxError : 'async' is a keyword I don't speack C so I can't provide a patch, sorry. |
python3 requires -Wd to display DeprecationWarning: https://mail.python.org/pipermail/python-dev/2017-November/150149.html Yury Selivanov: "We had PendingDeprecationWarning for async/await names in 3.5, and DeprecationWarning in 3.6." |
Sadly if I get my way this will all be reverted -- see https://bugs.python.org/issue35975. I'm working on a PR. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: