This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: documentation for sys.platform is unclear
Type: Stage:
Components: Documentation Versions: Python 2.3
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, georg.brandl, jackjansen, vimboss
Priority: normal Keywords:

Created on 2003-09-02 20:16 by vimboss, last changed 2022-04-10 16:10 by admin. This issue is now closed.

Messages (4)
msg60377 - (view) Author: Bram Moolenaar (vimboss) Date: 2003-09-02 20:16
The use of sys.platform is very risky, because it is
not at all clear what the possible values are.  For
example, on Mac OS X "darwin" is used, but this can
only be discovered by trying it out and asking Jack
when another value will be used.

Another problem is that the examples given include a
number, which suggests that an OS version number might
be included here.  Is that only a major version number?
 And why doesn't Mac OS X report "macosx10.2"?

Suggestion: Add a list of known values and for what
platforms they are used.
msg60378 - (view) Author: Jack Jansen (jackjansen) * (Python committer) Date: 2003-09-05 13:45
Logged In: YES 

A first step would be to document that for Unix the value is based 
on the information returned by "uname" *at the time of building 
Python*, mapped to lowercase and with some cruft removed.

For other platforms for which the value is known (Windows, 
MacOS9) we could document the actual values.
msg60379 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2003-09-06 21:23
Logged In: YES 

How often are new platforms supported?  From my short time on 
python-dev I would say not very often.  So listing all known 
platforms shouldn't suffer *too* much from bit rot, but it is 
something to consider before going forward with this.
msg61285 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-20 12:57
Implemented the suggestions in r60136.
Date User Action Args
2022-04-10 16:10:59adminsetgithub: 39176
2008-01-20 12:57:52georg.brandlsetstatus: open -> closed
nosy: + georg.brandl
resolution: fixed
messages: + msg61285
2003-09-02 20:16:12vimbosscreate