X Tutup
The Wayback Machine - https://web.archive.org/web/20221223165630/https://github.com/python/cpython/pull/95240
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

gh-95235: Add explicit parameter list to some sqlite3 methods #95240

Merged
merged 8 commits into from Jul 26, 2022

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Jul 25, 2022

Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Great stuff, thanks.

Do you think its worth adding a mention to the relevant parameters that are keyword or (especially, since their name is given) positional-only?

Also, given they are positional only, would it make sense to rename the narg/n_arg/num_params parameter, which is otherwise identical, to be consistant across the three functions? There's no obvious reason why it has a different name in each despite having a seemingly identical purpose and behavior.

Doc/library/sqlite3.rst Show resolved Hide resolved
Doc/library/sqlite3.rst Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
Doc/library/sqlite3.rst Outdated Show resolved Hide resolved
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Jul 25, 2022

Do you think its worth adding a mention to the relevant parameters that are keyword or (especially, since their name is given) positional-only?

I'm not sure it's needed. The signature is just above the parameter list, so IMO there is no need. I have no strong opinion about it though; I could easily be convinced otherwise.

Also, given they are positional only, would it make sense to rename the narg/n_arg/num_params parameter, which is otherwise identical, to be consistant across the three functions?

But it's not: create_aggregate has only one position-only parameter; n_arg can be specified as a keyword. I do dislike the current situation though. Personally I'd go with simply n or nargs.

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
@erlend-aasland
Copy link
Contributor Author

erlend-aasland commented Jul 25, 2022

Suggestions applied; a great improvement. Thanks again.

Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

LGTM now, thanks @erlend-aasland

@erlend-aasland erlend-aasland merged commit 5012bed into python:main Jul 26, 2022
14 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Jul 26, 2022

Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒🤖

@erlend-aasland erlend-aasland deleted the sqlite-doc-parameter-lists branch Jul 26, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 26, 2022
…ythonGH-95240)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 5012bed)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
@miss-islington
Copy link
Contributor

miss-islington commented Jul 26, 2022

Sorry, @erlend-aasland, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 5012bedc7ca7d78b5a42bf60eef55bac263f4060 3.10

@bedevere-bot
Copy link

bedevere-bot commented Jul 26, 2022

GH-95263 is a backport of this pull request to the 3.11 branch.

erlend-aasland added a commit to erlend-aasland/cpython that referenced this pull request Jul 26, 2022
…thods (pythonGH-95240)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 5012bed)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
@bedevere-bot
Copy link

bedevere-bot commented Jul 26, 2022

GH-95268 is a backport of this pull request to the 3.10 branch.

erlend-aasland added a commit that referenced this pull request Jul 26, 2022
…H-95240) (#95268)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>.
(cherry picked from commit 5012bed)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
ambv pushed a commit that referenced this pull request Jul 26, 2022
…) (GH-95263)

Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 5012bed)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants
X Tutup