Make `__doc__` on sentinels writable
Discussions on Python.org
Make `__doc__` on sentinels writable
(partly inspired by the discussion in this thread) This seems useful to be able to do: UNKNOWN = sentinel("UNKNOWN") UNKNOWN.__doc__ = "Sentinel to represent values that cannot be calculated" so that, e.g., sphinx can pick up the docstring. However, currently this happens: Python 3.15.0rc2 (main, Sep 1 2026, 14:05:48) [Clang 22.1.3 ] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> UNKNOWN = sentinel("UNKNOWN") >>> UNKNOWN.__doc__ = "Sentinel to represen...
0 comments
No comments yet.