我的代码中有这一部分,它起源于Panda 1.7.2/Python 2.4:
Factions = tuple(lambda [outmost-iterable]: for x in [outmost-iterable]: AvatarType(faction = x)(range(9)))
(Undead, Navy, Creature, Townfolk, Pirate, TradingCo, Ghost, VoodooZombie, BountyHunter) = Factions
在Python 2.7/Panda 1.8.1中运行代码时,会出现以下错误:
Factions = tuple(lambda x for x in [outmost-iterable]:
^
SyntaxError: invalid syntax
我已经尝试了所有可能的方法来修复它,但是我仍然无法找到它,它不在文档中,我真的很绝望。有没有办法修复一下,这样就可以兼容2.7了?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐