Skip to content

Commit 018b248

Browse files
authored
pythongh-97966: Update uname docs to clarify the special nature of the platform attribute and to indicate when it became late-bound. (python#97972)
1 parent 05e4886 commit 018b248

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Doc/library/platform.rst

+8-4
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,20 @@ Cross Platform
168168
containing six attributes: :attr:`system`, :attr:`node`, :attr:`release`,
169169
:attr:`version`, :attr:`machine`, and :attr:`processor`.
170170

171-
Note that this adds a sixth attribute (:attr:`processor`) not present
172-
in the :func:`os.uname` result. Also, the attribute names are different
173-
for the first two attributes; :func:`os.uname` names them
174-
:attr:`sysname` and :attr:`nodename`.
171+
:attr:`processor` is resolved late, on demand.
172+
173+
Note: the first two attribute names differ from the names presented by
174+
:func:`os.uname`, where they are named :attr:`sysname` and
175+
:attr:`nodename`.
175176

176177
Entries which cannot be determined are set to ``''``.
177178

178179
.. versionchanged:: 3.3
179180
Result changed from a tuple to a :func:`~collections.namedtuple`.
180181

182+
.. versionchanged:: 3.9
183+
:attr:`processor` is resolved late instead of immediately.
184+
181185

182186
Java Platform
183187
-------------
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update uname docs to clarify the special nature of the platform attribute
2+
and to indicate when it became late-bound.

0 commit comments

Comments
 (0)