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.

作者 neologix
收信人 neologix, pitrou, vstinner
日期 2011-06-13.14:51:11
SpamBayes Score 2.6262326e-13
Marked as misclassified
Message-id <1307976672.69.0.300868758392.issue12326@psf.upfronthosting.co.za>
In-reply-to
内容
> I would expect changing sys.platform will also break a lot of third-
> party code.

Maybe, but this would be an application bug.

Here's sys.platform current implementation:

const char *
Py_GetPlatform(void)
{
    return PLATFORM;
}


And here's the documentation, from http://docs.python.org/c-api/init.html

"""
Return the platform identifier for the current platform. On Unix, this is formed from the “official” name of the operating system, converted to lower case, followed by the major revision number"""

So it's actually documented.

> Perhaps sys.platform can still be 'linux2' under Linux 3.x? After
> all, there's no significant change that deserves changing
> sys.platform.

Sounds like a recipe for confusion.
历史
日期 用户 动作 参数
2011-06-13 14:51:13neologix修改recipients: + neologix, pitrou, vstinner
2011-06-13 14:51:12neologix修改messageid: <1307976672.69.0.300868758392.issue12326@psf.upfronthosting.co.za>
2011-06-13 14:51:12neologix链接issue12326 messages
2011-06-13 14:51:11neologix创建