2024-04-25 14:56:56 发布
网友
python-2.x有一个non-essential built in functions列表,但是python-3.x没有这样的列表,而且显然有built in functions in python-2.x不再在python-3.x中。在python-3.x中删除的所有python-2.x内置函数是否都有一个列表?你知道吗
The list of removed built-ins in 3.0 can be found here.
有几个函数已重命名:
intern()
sys.intern()
raw_input()
input()
eval(input())
reduce()
functools.reduce()
reload()
imp.reload()
importlib.reload
xrange()
range()
一个功能复活了:
callable()
The list of removed built-ins in 3.0 can be found here.
有几个函数已重命名:
intern()
被移到sys.intern()
。你知道吗raw_input()
被重命名为input()
。旧的行为可以用eval(input())
来模拟。你知道吗reduce()
被移到functools.reduce()
。你知道吗reload()
在3.0中移动到imp.reload()
,随后在3.4中移动到importlib.reload
。你知道吗xrange()
被重命名为range()
,取代了旧的range()
内置。你知道吗一个功能复活了:
callable()
,在3.0中被移除,在3.2中复活。你知道吗相关问题 更多 >
编程相关推荐