Skip to content

Commit e9c12aa

Browse files
committed
pythongh-97966: Update uname docs to clarify the special nature of the platform attribute and to indicate when it became late-bound.
1 parent 5c9302d commit e9c12aa

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Doc/library/platform.rst

Lines changed: 8 additions & 4 deletions
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
-------------
Lines changed: 2 additions & 0 deletions
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)