Skip to content

Commit ad3ca17

Browse files
authored
bpo-23747: Enhance platform doc, document default behavior (pythonGH-31462)
1 parent d7d7e6c commit ad3ca17

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Doc/library/platform.rst

+8-6
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Cross Platform
139139

140140
.. function:: release()
141141

142-
Returns the system's release, e.g. ``'2.2.0'`` or ``'NT'`` An empty string is
142+
Returns the system's release, e.g. ``'2.2.0'`` or ``'NT'``. An empty string is
143143
returned if the value cannot be determined.
144144

145145

@@ -176,7 +176,7 @@ Cross Platform
176176
Entries which cannot be determined are set to ``''``.
177177

178178
.. versionchanged:: 3.3
179-
Result changed from a tuple to a namedtuple.
179+
Result changed from a tuple to a :func:`~collections.namedtuple`.
180180

181181

182182
Java Platform
@@ -201,7 +201,9 @@ Windows Platform
201201

202202
Get additional version information from the Windows Registry and return a tuple
203203
``(release, version, csd, ptype)`` referring to OS release, version number,
204-
CSD level (service pack) and OS type (multi/single processor).
204+
CSD level (service pack) and OS type (multi/single processor). Values which
205+
cannot be determined are set to the defaults given as parameters (which all
206+
default to an empty string).
205207

206208
As a hint: *ptype* is ``'Uniprocessor Free'`` on single processor NT machines
207209
and ``'Multiprocessor Free'`` on multi processor machines. The *'Free'* refers
@@ -211,9 +213,9 @@ Windows Platform
211213

212214
.. function:: win32_edition()
213215

214-
Returns a string representing the current Windows edition. Possible
215-
values include but are not limited to ``'Enterprise'``, ``'IoTUAP'``,
216-
``'ServerStandard'``, and ``'nanoserver'``.
216+
Returns a string representing the current Windows edition, or ``None`` if the
217+
value cannot be determined. Possible values include but are not limited to
218+
``'Enterprise'``, ``'IoTUAP'``, ``'ServerStandard'``, and ``'nanoserver'``.
217219

218220
.. versionadded:: 3.8
219221

0 commit comments

Comments
 (0)