bpo-42840: Document providing kwargs to type.#24173
bpo-42840: Document providing kwargs to type.#24173gvanrossum merged 4 commits intopython:masterfrom
Conversation
Fidget-Spinner
left a comment
There was a problem hiding this comment.
Thanks for making this PR to improve the docs! I have some minor comments.
|
|
||
| .. class:: type(object) | ||
| type(name, bases, dict) | ||
| type(name, bases, dict, **kwds) |
There was a problem hiding this comment.
Personally I like kwds more, but the rest of the document seems to be using **kwargs or **kwarg (there's one **kws too !), so I'd suggest using **kwargs to keep consistent.
| type(name, bases, dict, **kwds) | |
| type(name, bases, dict, **kwargs) |
There was a problem hiding this comment.
That was my initial choice, but typeshed and the section on customizing class creation in the docs mostly uses **kwds (it also uses **kwargs once). Given that reasoning, if you still think **kwargs is best I'm happy to change it.
There was a problem hiding this comment.
Up to you. I think as it stands right now it's okay :).
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
This PR is stale because it has been open for 30 days with no activity. |
gvanrossum
left a comment
There was a problem hiding this comment.
I'll merge this now. I'll mark it for backport to 3.9 and 3.8, but if those backports fail I'll just give up on them.
|
Thanks @esoma for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
|
@gvanrossum: Please replace |
|
GH-24695 is a backport of this pull request to the 3.9 branch. |
|
GH-24696 is a backport of this pull request to the 3.8 branch. |
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> (cherry picked from commit 72fcd14) Co-authored-by: Erik Soma <stillusingirc@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> (cherry picked from commit 72fcd14) Co-authored-by: Erik Soma <stillusingirc@gmail.com>
https://bugs.python.org/issue42840