小编arc*_*ak2的帖子

AttributeError:模块'attr'没有属性's'

>>> import attr
>>> @attr.s
... class SmartClass(object):
...     a=attr.ib()
...     b=attr.ib()
... 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'attr' has no attribute 's'
>>> 
Run Code Online (Sandbox Code Playgroud)

我不明白为什么它不起作用.我已经使用pip安装了这个模块并且安装正确,但是它仍然在实现部分中显示错误.

python

6
推荐指数
1
解决办法
7108
查看次数

标签 统计

python ×1