Discuss / Python / python3.6的版本

python3.6的版本

Topic source

涨潮lucky

#1 Created at ... [Delete] [Delete and Lock User]

int2 = functools.partial(int, base=2)

执行这段的时候,给我报这样的错误: AttributeError: module 'functools' has no attribute 'partial'

是因为后面版本没有这个偏函数了吗?

文广呦呦

#2 Created at ... [Delete] [Delete and Lock User]

我没出现你这种问题啊,输入的都一样,也是python最新版本

需要import functools

skysmine

#4 Created at ... [Delete] [Delete and Lock User]

你没import功能- -

YSK射手

#5 Created at ... [Delete] [Delete and Lock User]

记得import functools

Whenz-

#6 Created at ... [Delete] [Delete and Lock User]

前面加一句 import functools 引入functools 模块


  • 1

Reply