differences in python 2 and python 3

来源:互联网 发布:视频编辑软件 编辑:程序博客网 时间:2024/05/29 04:37
  1. map function, python 2 extending with None to longest, python 3 stop at the shortest. point of interest: itertools.zip_longest(*iterables, fillvalue=None) (python 3), itertools.izip_longest(*iterables[, fillvalue]) (python 2.6+)
  2. integer division, if you want python 2 behavior in python 3, using // instead.

  3. ref: Supporting Python 3, Language differences and workarounds
0 0
原创粉丝点击