本文整理汇总了Python中memobject.MemObject.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python MemObject.__init__方法的具体用法?Python MemObject.__init__怎么用?Python MemObject.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类memobject.MemObject
的用法示例。
在下文中一共展示了MemObject.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from memobject import MemObject [as 别名]
# 或者: from memobject.MemObject import __init__ [as 别名]
def __init__(self, name,pk,data={},fk=None,**kw):
"""
"""
MemObject.__init__(self, name,**kw)
self._pk = pk
self._fk = fk
self.data = data
示例2: __init__
# 需要导入模块: from memobject import MemObject [as 别名]
# 或者: from memobject.MemObject import __init__ [as 别名]
def __init__(self, name,pk,timeout=TIMEOUT,**kw):
MemObject.__init__(self, name, mclient)
self._pk = pk
self._fk = kw.get('fk','')
self._incrkey = kw.get('incrkey','')
self._incrvalue = kw.get('incrvalue',0)
self._timeout = timeout
示例3: __init__
# 需要导入模块: from memobject import MemObject [as 别名]
# 或者: from memobject.MemObject import __init__ [as 别名]
def __init__(self, name,pk,data={}):
"""
"""
MemObject.__init__(self, name, mclient)
self._state = MMODE_STATE_ORI#对象的状态 0未变更 1新建 2更新 3删除
self._pk = pk
self.data = data
self._time = time.time()
示例4: __init__
# 需要导入模块: from memobject import MemObject [as 别名]
# 或者: from memobject.MemObject import __init__ [as 别名]
def __init__(self, pid, name, mc):
"""
"""
MemObject.__init__(self, name, mc)
self.id = pid
self.level = 0
self.profession = 0
self.nickname = u""
self.guanqia = 1000
示例5: __init__
# 需要导入模块: from memobject import MemObject [as 别名]
# 或者: from memobject.MemObject import __init__ [as 别名]
def __init__(self,pid,name,mc):
"""初始化城镇要塞对象
@param territoryId: int 领地的ID
@param guard: int 殖民者的ID
@param guardname: str 殖民者的名称
@param updateTime: int 领地被更新的时间
"""
MemObject.__init__(self, name, mc)
self.id = pid
self.level = 0
self.profession = 0
self.nickname = u''
self.guanqia = 1000
示例6: __init__
# 需要导入模块: from memobject import MemObject [as 别名]
# 或者: from memobject.MemObject import __init__ [as 别名]
def __init__(self, mAdmin, pk, data={}):
MemObject.__init__(self, mAdmin.getName() + ':%s' % pk, timeout=mAdmin.timeout)
self._mAdmin = mAdmin
self._pk = pk
self.data = data