本文整理汇总了Python中persistent.mapping.PersistentMapping.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python PersistentMapping.__init__方法的具体用法?Python PersistentMapping.__init__怎么用?Python PersistentMapping.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类persistent.mapping.PersistentMapping
的用法示例。
在下文中一共展示了PersistentMapping.__init__方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self):
PersistentMapping.__init__(self)
self.blogs = IOBTree()
self.categories = Categories()
self.tags = Tags()
示例2: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, content_id, data=None, **kwargs):
if not data:
data = {}
PersistentMapping.__init__(self)
Base.__init__(self, content_id, data=data)
self._order = []
示例3: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, crumb_name, owner, id):
PersistentMapping.__init__(self)
self.item_number = 0
self.timestamp = datetime.now()
self.id = id
self.owner = owner
# Name used in breadcrumps
self.crumb_name = crumb_name
示例4: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, log):
#self.start_time = log['start_time']
#self.players = log['players']
#self.units = log['units']
#self.grid = log['grid']
#self['init_locs'] = log['init_locs']
PersistentMapping.__init__(self, init_locs=log['init_locs'],
start_time=log['start_time'],
units=log['units'],
grid=log['grid'],
owners=log['owners'],)
示例5: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, d=None):
# _ct is creation time
self._ct = time.time()
PersistentMapping.__init__(self, d)
示例6: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, family=None):
PersistentMapping.__init__(self)
if family is not None:
self.family = family
示例7: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, dict=None):
self._keys = []
BaseDict.__init__(self, dict)
if dict is not None:
self._keys = self.data.keys()
示例8: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, body):
PersistentMapping.__init__(self)
self.body = body
示例9: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self):
PersistentMapping.__init__(self)
Contacts(self)
Projects(self)
Users(self)
示例10: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self):
PersistentMapping.__init__(self)
self[DEFAULT] = DefaultViewletsForType()
示例11: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, *args, **kw):
PersistentMapping.__init__(self, *args, **kw)
self._by_rev_index = {}
示例12: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, name):
PersistentMapping.__init__(self)
self.__name__ = name
self.id = name
self.name = name
示例13: __init__
# 需要导入模块: from persistent.mapping import PersistentMapping [as 别名]
# 或者: from persistent.mapping.PersistentMapping import __init__ [as 别名]
def __init__(self, title):
PersistentMapping.__init__(self)
self.title = title