Raymond Hettinger raymond.hettin...@gmail.com added the comment:
Martin, thanks for the explanation.
Hopefully, this tracker entry will serve to permanently document why Python2 on
Windows behaves as it does.
--
___
Python tracker
Nadeem Vawda nadeem.va...@gmail.com added the comment:
64-bit Windows (or at least Visual C++) uses the LLP64 model, so a long
is 32 bits wide (the only 64-bit integer type being long long) - see
http://en.wikipedia.org/wiki/64-bit#64-bit_data_models
Since Python's int is documented as being
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
IIRC sys.maxsize was added for this reason. This one should show a 64bit value.
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13965
Mark Dickinson dicki...@gmail.com added the comment:
Or more directly, try platform.architecture().
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13965
___
Ralf Schmitt python-b...@systemexit.de added the comment:
struct.calcsize(P)==8 will tell you if you're running a 64bit python or not.
--
nosy: +schmir
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13965
Ralf Schmitt python-b...@systemexit.de added the comment:
according to the documentation platform.architecture() may not work on OS X.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13965
Raymond Hettinger raymond.hettin...@gmail.com added the comment:
platform.architecture() and struct.calcsize(P) confirm that this build used
64-bits for pointers and 32-bits for ints.
This leaves the question of whether LLP64 is required to run Python on Windows
or whether another memory
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
LLP64 is the model chosen by the Microsoft compiler: sizeof(long)==4.
I suppose someone already considered to change PyIntObject and use size_t
values, but IMO it would have broken too many extensions: the pattern if
Martin v. Löwis mar...@v.loewis.de added the comment:
On Win64, the long type is 32-bit; the compiler does not support any other
mode. So the question whether another memory model could have been selected
during compilation must be answered as no, the compiler does not support
multiple memory
New submission from Raymond Hettinger raymond.hettin...@gmail.com:
On the downloader page, http://www.python.org/download/releases/2.7.2/ there is
an entry •Windows X86-64 MSI Installer that links to
http://www.python.org/ftp/python/2.7.2/python-2.7.2.amd64.msi
Running this installer succeeds
10 matches
Mail list logo