https://github.com/python/cpython/commit/fa9bb9a09273c7fba8023b24069f570797de01b4
commit: fa9bb9a09273c7fba8023b24069f570797de01b4
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: savannahostrowski <[email protected]>
date: 2025-11-02T21:08:47-08:00
summary:

[3.14] gh-140693: Improve `argparse` documentation about controlling color 
(GH-140737) (#140932)

gh-140693: Improve `argparse` documentation about controlling color (GH-140737)
(cherry picked from commit 31de83d5e2e17f4e9a37e08b384bab916e1da7c1)

Co-authored-by: Krishna Chaitanya 
<[email protected]>

files:
M Doc/library/argparse.rst

diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index a7603ac272633d..0ee921e15260c4 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -639,6 +639,11 @@ by setting ``color`` to ``False``::
    ...                     help='an integer for the accumulator')
    >>> parser.parse_args(['--help'])
 
+Note that when ``color=True``, colored output depends on both environment
+variables and terminal capabilities.  However, if ``color=False``, colored
+output is always disabled, even if environment variables like ``FORCE_COLOR``
+are set.
+
 .. versionadded:: 3.14
 
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to