Skip to content
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

Rename function arg async to async_ #15

Open
jayvdb opened this issue Jun 30, 2020 · 1 comment
Open

Rename function arg async to async_ #15

jayvdb opened this issue Jun 30, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jayvdb
Copy link

jayvdb commented Jun 30, 2020

A lot of pre py37 codebases use async which needs to be renamed on Python 3.7+. Detecting when it was used before it was claimed by the language may be a bit tricky to perfect, but the most common case of function args seems quite doable.

@amyreese amyreese added enhancement New feature or request help wanted Extra attention is needed labels Jul 25, 2020
@graingert
Copy link
Contributor

graingert commented Sep 3, 2020

kwargs can be passed in with

foo.task1(**{"async": True})
foo.task2(**{"await": True})

the other way is harder,

maybe a decorator could be provided to alias keyword kwargs into _ suffix alternatives?

@pep492
def task1(ham, async_):

@pep492
def task2(ham, await_):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants