class LuaTable:
-- def __init__(self, **argss):
---- self.__dict__ = dict(argss)
player = LuaTable(name = 'p1', hp = 10)
print player.name
print player.hp
dog = LuaTable(name='dog', type='dog')
print dog.name
dog.food = 'bone'
I hate python dict, so make something like lua table.
posted on 2010-05-24 20:05
LOGOS 阅读(637)
评论(0) 编辑 收藏 引用