int2 = functools.partial(int, base=2)
执行这段的时候,给我报这样的错误: AttributeError: module 'functools' has no attribute 'partial'
是因为后面版本没有这个偏函数了吗?
我没出现你这种问题啊,输入的都一样,也是python最新版本
需要import functools
你没import功能- -
记得import functools
前面加一句 import functools 引入functools 模块
Sign in to make a reply
涨潮lucky
执行这段的时候,给我报这样的错误: AttributeError: module 'functools' has no attribute 'partial'
是因为后面版本没有这个偏函数了吗?