【发布时间】:2017-04-06 09:11:30
【问题描述】:
对于我正在使用time.time() 的扫雷游戏,我同时导入了time 和pygame。这是我的错误报告
line 5, in save_score
end = time.time()
AttributeError: module 'pygame.time' has no attribute 'time'
这里有我确实导入了 time 和 pygame 的证据:
import sys, math, time
def save_score(name, size, mine):
end = time.time()
~
from pygame import *
如果有人能解释如何避免/修复此错误,将不胜感激。
【问题讨论】:
-
你在做
from pygame import *时有冲突(检查stackoverflow.com/questions/9916878/…)
标签: python python-3.x time pygame