From 4bab73f8a6cb623fd2b56733afb61bdde810a48b Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Mon, 28 Feb 2022 15:26:36 +0100 Subject: [PATCH] Clarify argument type of platform.platform(aliased, terse) to boolean --- Doc/library/platform.rst | 6 +++--- Lib/platform.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index a0eece6c4d8aa0..1917d8bed250b4 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -63,7 +63,7 @@ Cross Platform string is returned if the value cannot be determined. -.. function:: platform(aliased=0, terse=0) +.. function:: platform(aliased=False, terse=False) Returns a single string identifying the underlying platform with as much useful information as possible. @@ -71,12 +71,12 @@ Cross Platform The output is intended to be *human readable* rather than machine parseable. It may look different on different platforms and this is intended. - If *aliased* is true, the function will use aliases for various platforms that + If *aliased* is ``True``, the function will use aliases for various platforms that report system names which differ from their common names, for example SunOS will be reported as Solaris. The :func:`system_alias` function is used to implement this. - Setting *terse* to true causes the function to return only the absolute minimum + Setting *terse* to ``True`` causes the function to return only the absolute minimum information needed to identify the platform. .. versionchanged:: 3.8 diff --git a/Lib/platform.py b/Lib/platform.py index 3f3f25a2c92d3b..1c6a2518c336ac 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -1176,7 +1176,7 @@ def python_compiler(): _platform_cache = {} -def platform(aliased=0, terse=0): +def platform(aliased=False, terse=False): """ Returns a single string identifying the underlying platform with as much useful information as possible (but no more :). @@ -1185,13 +1185,13 @@ def platform(aliased=0, terse=0): machine parseable. It may look different on different platforms and this is intended. - If "aliased" is true, the function will use aliases for + If "aliased" is True, the function will use aliases for various platforms that report system names which differ from their common names, e.g. SunOS will be reported as Solaris. The system_alias() function is used to implement this. - Setting terse to true causes the function to return only the + Setting terse to True causes the function to return only the absolute minimum information needed to identify the platform. """