python2程序移植python3的一些注意事项

  1 queue:

  python2: import Queue

  python3: import queue

  2 queue size:  

  python2: cache = Queue.Queue(maxsize=5)

  python3: cache = queue.Queue(maxsize=5)

  3 sorted:  

  python2: zip(a,b).sort()

  python3: sorted(zip(a,b))

原文地址:https://www.cnblogs.com/dylancao/p/9392301.html