Bug report
Bug description:
Bug Report: colorsys module missing docstrings
Description
The colorsys module (Lib/colorsys.py) has no proper docstrings for the module itself or any of its 6 conversion functions.
- Running
help(colorsys) or help(colorsys.rgb_to_hsv) in Python shows no useful documentation—only the function signature and a generic "no docstring" message.
- The module has only a short top comment (not a
__doc__ string), and all functions lack parameter descriptions, return value ranges, input constraints, or exception notes.
- The official library docs (Doc/library/colorsys.rst) exist separately but are not embedded in the code, so they don't appear in interactive help.
Expected behavior
- The module should have a proper
__doc__ string explaining its purpose, color spaces (RGB/YIQ/HLS/HSV), and value ranges.
- Each function (rgb_to_yiq, yiq_to_rgb, rgb_to_hls, hls_to_rgb, rgb_to_hsv, hsv_to_rgb) should have a docstring with:
- Parameter names and expected ranges (0.0–1.0 for most, YIQ I/Q can be negative)
- Return value structure and ranges
- Brief description of the conversion
- Notes on edge cases (e.g., division by zero near white in hls conversions)
Example
>>> import colorsys
>>> help(colorsys.rgb_to_hsv)
Help on function rgb_to_hsv in module colorsys:
rgb_to_hsv(r, g, b)
# No docstring here—only the signature
CPython versions tested on:
3.9, 3.14
Operating systems tested on:
Windows
Linked PRs
Bug report
Bug description:
Bug Report: colorsys module missing docstrings
Description
The
colorsysmodule (Lib/colorsys.py) has no proper docstrings for the module itself or any of its 6 conversion functions.help(colorsys)orhelp(colorsys.rgb_to_hsv)in Python shows no useful documentation—only the function signature and a generic "no docstring" message.__doc__string), and all functions lack parameter descriptions, return value ranges, input constraints, or exception notes.Expected behavior
__doc__string explaining its purpose, color spaces (RGB/YIQ/HLS/HSV), and value ranges.Example
CPython versions tested on:
3.9, 3.14
Operating systems tested on:
Windows
Linked PRs