Documentation for `PYTHONUNBUFFERED` is not correct
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Documentation
Follow up on: https://github.com/python/cpython/issues/128377
According to docs, PYTHONUNBUFFERED is true if set as a non-empty string. Setting it to "0" (which is non-empty string) has effect of disabling it though.
Related C code:
https://github.com/python/cpython/blob/d903b17499b1a3bfb3ea848f6a1b6da02eac3328/Python/initconfig.c#L1786-L1790
https://github.com/python/cpython/blob/d903b17499b1a3bfb3ea848f6a1b6da02eac3328/Python/preconfig.c#L563-L578
https://github.com/python/cpython/blob/d903b17499b1a3bfb3ea848f6a1b6da02eac3328/Python/preconfig.c#L545-L560
We should probably rephrase it from:
If this is set to a non-empty string...
to:
If this is set...
Linked PRs
- gh-128393
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the PYTHONUNBUFFERED entry in the Python command-line environment-variable documentation and compare its wording with the cited logic in Python/initconfig.c and Python/preconfig.c. Update the description so it accurately reflects the documented behavior, then verify the resulting documentation wording; note that linked PR gh-128393 indicates work is already underway.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100