你的OS是64位,但你的python是32位的。你试试看import sys; print sys.maxint,看看是不是2147483647就知道了。
python里dict的entry是放在一个连续的数组里的。在32位的python里,这个数组的最大长度大概就在44739243左右。

除了换python的版本以外,你还可以想一些workaround,比如,申请16个dict,以k % 16的结果决定放在哪个字典里

 

i test this also on my 64bit version win7 and ubuntu lucid 64bit

on my win 7 i install activestate py2.7 which return the 2147483647

 

on my ubuntu returend 9223372036854775807

相关文章:

  • 2021-11-01
  • 2021-12-06
  • 2022-12-23
  • 2021-06-04
  • 2021-11-28
  • 2021-09-09
  • 2021-08-20
猜你喜欢
  • 2021-09-12
  • 2021-07-17
  • 2021-12-18
  • 2022-01-22
  • 2021-05-02
  • 2022-02-09
  • 2022-12-23
相关资源
相似解决方案