diff options
author | Larry Hastings <larry@hastings.org> | 2012-06-24 21:30:41 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2012-06-24 21:30:41 (GMT) |
commit | 68386bc0b88eb4b7c9aeb4f753114dc85f8df5b6 (patch) | |
tree | 051c2a77f319435a45f398049806b6fd2e09408b /Doc/library | |
parent | 56ed2844fa88882a91f9ccf670c0e7a9736eb2a2 (diff) | |
download | cpython-68386bc0b88eb4b7c9aeb4f753114dc85f8df5b6.zip cpython-68386bc0b88eb4b7c9aeb4f753114dc85f8df5b6.tar.gz cpython-68386bc0b88eb4b7c9aeb4f753114dc85f8df5b6.tar.bz2 |
Issue #15164: Change return value of platform.uname() from a
plain tuple to a collections.namedtuple.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/platform.rst | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst index 938c270..c29811c 100644 --- a/Doc/library/platform.rst +++ b/Doc/library/platform.rst @@ -158,14 +158,20 @@ Cross Platform .. function:: uname() - Fairly portable uname interface. Returns a tuple of strings ``(system, node, - release, version, machine, processor)`` identifying the underlying platform. + Fairly portable uname interface. Returns a :func:`~collections.namedtuple` + containing six attributes: :attr:`system`, :attr:`node`, :attr:`release`, + :attr:`version`, :attr:`machine`, and :attr:`processor`. - Note that unlike the :func:`os.uname` function this also returns possible - processor information as additional tuple entry. + Note that this adds a sixth attribute (:attr:`processor`) not present + in the :func:`os.uname` result. Also, the attribute names are different + for the first two attributes; :func:`os.uname` names them + :attr:`sysname` and :attr:`nodename`. Entries which cannot be determined are set to ``''``. + .. versionchanged:: 3.3 + Result changed from a tuple to a namedtuple. + Java Platform ------------- |