diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-04-20 16:41:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-20 16:41:12 (GMT) |
commit | 886b22c4c3c5324bcebb79402c92d18ebc4224b6 (patch) | |
tree | edb8eafebbe89e82736cbde9ff3db0f8726662db | |
parent | c33524e68b853b8b313536af1b7092efd53e5d15 (diff) | |
download | cpython-886b22c4c3c5324bcebb79402c92d18ebc4224b6.zip cpython-886b22c4c3c5324bcebb79402c92d18ebc4224b6.tar.gz cpython-886b22c4c3c5324bcebb79402c92d18ebc4224b6.tar.bz2 |
bpo-23747: Enhance platform doc, document default behavior (GH-31462)
(cherry picked from commit ad3ca17ff5cd63f907430073b52be27695674148)
Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
-rw-r--r-- | Doc/library/platform.rst | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index a0eece6..346063d 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -139,7 +139,7 @@ Cross Platform .. function:: release() - Returns the system's release, e.g. ``'2.2.0'`` or ``'NT'`` An empty string is + Returns the system's release, e.g. ``'2.2.0'`` or ``'NT'``. An empty string is returned if the value cannot be determined. @@ -176,7 +176,7 @@ Cross Platform Entries which cannot be determined are set to ``''``. .. versionchanged:: 3.3 - Result changed from a tuple to a namedtuple. + Result changed from a tuple to a :func:`~collections.namedtuple`. Java Platform @@ -201,7 +201,9 @@ Windows Platform Get additional version information from the Windows Registry and return a tuple ``(release, version, csd, ptype)`` referring to OS release, version number, - CSD level (service pack) and OS type (multi/single processor). + CSD level (service pack) and OS type (multi/single processor). Values which + cannot be determined are set to the defaults given as parameters (which all + default to an empty string). As a hint: *ptype* is ``'Uniprocessor Free'`` on single processor NT machines and ``'Multiprocessor Free'`` on multi processor machines. The *'Free'* refers @@ -211,9 +213,9 @@ Windows Platform .. function:: win32_edition() - Returns a string representing the current Windows edition. Possible - values include but are not limited to ``'Enterprise'``, ``'IoTUAP'``, - ``'ServerStandard'``, and ``'nanoserver'``. + Returns a string representing the current Windows edition, or ``None`` if the + value cannot be determined. Possible values include but are not limited to + ``'Enterprise'``, ``'IoTUAP'``, ``'ServerStandard'``, and ``'nanoserver'``. .. versionadded:: 3.8 |