-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Improve documentation for the copy
module
#134559
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
Comments
Do you have a suggested (re-)structure? A |
Hi! |
Jeez, c'mon guys... it's the weekend. 😀 But, here you go: My first stab at reorganized docs. Which got involved enough that I just decided to open a PR with the changes: #134695 |
…nGH-134672) (cherry picked from commit 71290a6) Co-authored-by: tmlnv <108088921+tmlnv@users.noreply.github.com>
…nGH-134672) (cherry picked from commit 71290a6) Co-authored-by: tmlnv <108088921+tmlnv@users.noreply.github.com>
object.__replace__
isn'tcopy
module
Uh oh!
There was an error while loading. Please reload this page.
Documentation
In the
copy
module documentation, the functioncopy.replace()
has a.. versionadded::
annotation marking it as new in Python 3.13.But the related
object.__replace__
dunder method — which is documented muuuuuch farther down the page, near the very end — has no such annotation.IMHO the two are too far apart and separated by too much completely unrelated documentation, for the annotation from
copy.replace()
to be implicitly applicable toobject.__replace__
as well.Module-level organization of content
To be perfectly honest, I'm not sure it makes sense for
copy.replace()
to eventually be documented so far from where it's initially introduced. Especially considering how brief that documentation actually is, the separation may do more harm than good.No other module in the "Data Types" section starts with an "Interface summary:" like the one in the
copy
documentation. The most similar doc is theenum
module's, which has a §Module Contents at the start. But there inline version annotations are skipped to keep the TOC concise, instead they're collected down below the list itself. Relevant annotations are also included in the detailed documentation sections that follow.The organization of the
copy
docs is sort of... well, there's much less organization there, than in the documentation for other modules. (Probably attributable to both the age and extremely short length of thecopy
documentation.)Linked PRs
copy
module #134695object.__replace__()
(GH-134672) #134699object.__replace__()
(GH-134672) #134700The text was updated successfully, but these errors were encountered: