Python sys.maxint, sys.maxunicode on Linux and windows

On 64-bit Debian Linux 6:

Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxint
9223372036854775807
>>> sys.maxunicode
1114111

On 64-bit Windows 7:

Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.maxint
2147483647
>>> sys.maxunicode
65535

Both operating systems are 64-bit. They have sys.maxunicode, according to wikipedia. There are 1111112 code points in Unicode. Is sys.maxunicode wrong on Windows?

And why do they have different sys.maxint?

+5
source share
2 answers

I don't know what your question is, but it sys.maxunicodedoesn't work on Windows.

See the docs :

sys.maxunicode

, . , , Unicode UCS-2 UCS-4.

Python Windows UCS-2, 65 535 ( 2 * 16- " " ).

sys.maxint, , Python 2 " " (123) " " (12345678987654321L). , Python Windows 32 , Python Linux 64 . Python 3, , . sys.maxint Python 3.

+4

- sys.maxint, . 64- Windows?. Python Python 2.x.

+1

All Articles