【发布时间】:2012-11-06 18:38:59
【问题描述】:
我正在尝试腌制一个 pygame.event.Event 对象:
eventObj= pygame.event.get()[0]
data= pickle.dumps(eventObj)
但我收到此错误:
_pickle.PicklingError: Can't pickle <class 'Event'>: attribute lookup builtins.Event failed
【问题讨论】:
-
type(enventObj)返回什么? -
type(eventObj)按原样返回<class 'Event'>
标签: python python-3.x pygame pickle