python: __future__的介绍

 __future__ 给旧版本python提供新版本python的特性例如:

在python2.X中可以使用print"" 也可以使用print()

但是加载这个print的新特性就只能用print() 

from __future__ import print_function

 

引入新特性的机制挺有意思的奥。

posted on 2019-07-07 16:33  thotf  阅读(928)  评论(0)    收藏  举报

导航