Skip to content

Conversation

sekomer
Copy link
Contributor

@sekomer sekomer commented Nov 30, 2023

Refined the documentation for the gc.collect() function to provide a more accurate description of its behavior. Specifically, updated the documentation to reflect that the function now returns the sum of the number of objects collected and the number of uncollectable objects. This adjustment aligns the documentation with the existing implementation in gcmodule.c, where the stats returned by gc.collect() include both collected and uncollectable objects.

No changes were made to the gcmodule.c code; this modification focuses solely on improving the clarity of the documentation.

@sekomer sekomer requested a review from pablogsal as a code owner November 30, 2023 20:22
@bedevere-app bedevere-app bot added awaiting review docs Documentation in the Doc dir skip news labels Nov 30, 2023
@AlexWaygood AlexWaygood changed the title Docs: Improve docs for gc.collect method gh-112502: Docs: Improve docs for gc.collect method Nov 30, 2023
@pablogsal pablogsal merged commit 730d450 into python:main Nov 30, 2023
@pablogsal
Copy link
Member

Thanks for your contribution @sekomer !

@sekomer
Copy link
Contributor Author

sekomer commented Dec 1, 2023

My pleasure :) @pablogsal

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
)

* Docs: Improve docs for gc.collect method

* Update gc.rst
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
)

* Docs: Improve docs for gc.collect method

* Update gc.rst
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.

2 participants