【发布时间】:2011-01-27 20:32:47
【问题描述】:
在 Python 3.1.1 中使用代码 print('{0} is not'.format('That that is not')),我收到以下错误:
AttributeError: 'str' object has no attribute 'format'
当我删除 Netbeans 开头自动插入的行时:
from distutils.command.bdist_dumb import format
它本身会导致错误
ImportError: cannot import name format
我在这里做错了什么?
【问题讨论】: