summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-12-21 18:56:45 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-12-21 18:56:45 (GMT)
commit5cf36729994491329168f0cebea128fd1f7bb72d (patch)
treecd34ddc4a08490df144f628d89a3ef3f477c94e7
parentc132b590b6abcd0b50c53c8049a0f0e77d47fb63 (diff)
downloadcpython-5cf36729994491329168f0cebea128fd1f7bb72d.zip
cpython-5cf36729994491329168f0cebea128fd1f7bb72d.tar.gz
cpython-5cf36729994491329168f0cebea128fd1f7bb72d.tar.bz2
Merged revisions 87421 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87421 | antoine.pitrou | 2010-12-21 19:49:01 +0100 (mar., 21 déc. 2010) | 4 lines Suggest sys.maxsize as a reliable way to know whether the interpreter is 64-bit. (part of #10735) ........
-rw-r--r--Doc/library/platform.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/Doc/library/platform.rst b/Doc/library/platform.rst
index b98d992..7802422 100644
--- a/Doc/library/platform.rst
+++ b/Doc/library/platform.rst
@@ -38,6 +38,16 @@ Cross Platform
and then only if the executable points to the Python interpreter. Reasonable
defaults are used when the above needs are not met.
+ .. note::
+
+ On Mac OS X (and perhaps other platforms), executable files may be
+ universal files containing multiple architectures.
+
+ To get at the "64-bitness" of the current interpreter, it is more
+ reliable to query the :attr:`sys.maxsize` attribute::
+
+ is_64bits = sys.maxsize > 2**32
+
.. function:: machine()
@@ -194,7 +204,7 @@ Windows Platform
.. note::
- Note: this function works best with Mark Hammond's
+ This function works best with Mark Hammond's
:mod:`win32all` package installed, but also on Python 2.3 and
later (support for this was added in Python 2.6). It obviously
only runs on Win32 compatible platforms.