-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 0637: Add another rationale #1615
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). Recognized GitHub usernameWe couldn't find a bugs.python.org (b.p.o) account corresponding to the following GitHub usernames: This might be simply due to a missing "GitHub Name" entry in one's b.p.o account settings. This is necessary for legal reasons before we can look at this contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
Account at bpo updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this use-case, but I think it needs to be explained better. I didn't really understand it until I followed the links to the trio-run bug report and read this:
"Anyway, here's the problem: a function like run has to take the thing to run, and it also has to take its own arguments to configure how it runs it. So we need some way to distinguish which arguments are for which, but all the possible solutions involve some kind of awkwardness."
My personal feeling is that quoting the trio-run dev directly, with a link to the bug report, actual speaks stronger than the code samples. The problem with the code samples is that until you understand what they are intended to do, which requires some familiarity with trio-run, they look "good enough" -- especially the first, without partial.
smurfix, if you agree, would you care to reword the rationale?
Otherwise, if you disagree and think that your existing wording is superior, I won't argue further. Either way, I think it is an excellent use-case.
Reworded the rationale and (over g)commented the example code |
This has a merge conflict now; it would also be good to get a review from the PEP authors. |
@JelleZijlstra on it. |
I think it's a great use case, but we will have to find a way to have it idiomatic for some design choices. |
@stefanoborini -- This PR is still open; what do you want to do with it? |
@gvanrossum Good for me. can be merged. |
Another use for this PEP is parameterizing a function that takes another function (plus its arguments). We need some Pythonic way to distinguish keywords the caller from those for the passed-in function. This notation would work much like typing and thus avoid the shortcomings of alternate solutions.