本文整理汇总了Python中shared_utils.forEach函数的典型用法代码示例。如果您正苦于以下问题:Python forEach函数的具体用法?Python forEach怎么用?Python forEach使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了forEach函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: __fillShells
def __fillShells(self, ctrl):
forEach(lambda args: self.__onShellsAdded(*args), ctrl.getOrderedShellsLayout())
shellCD = ctrl.getNextShellCD()
if shellCD is not None:
self.__onNextShellChanged(shellCD)
shellCD = ctrl.getCurrentShellCD()
if shellCD is not None:
self.__onCurrentShellChanged(shellCD)
return
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:9,代码来源:consumables_panel.py
示例2: __doChangeSetting
def __doChangeSetting(self, item, entityName = None, avatar = None):
result, error = item.canActivate(entityName, avatar)
if result and avatar_getter.isPlayerOnArena(avatar):
if item.getStage() == EQUIPMENT_STAGES.PREPARING:
item.deactivate()
else:
forEach(lambda e: e.deactivate(), [ e for e in self._equipments.itervalues() if e.getStage() == EQUIPMENT_STAGES.PREPARING ])
item.activate(entityName, avatar)
return (result, error)
开发者ID:webiumsk,项目名称:WOT0.10.0,代码行数:9,代码来源:equipment_ctrl.py
示例3: _onClubUpdated
def _onClubUpdated(self, clubDbID, clubCompactDescr):
if clubDbID == self.__clubDbID:
if not clubCompactDescr:
self.notify('onClubUpdated', None)
if self.__clubsCtrl is not None:
self.__clubsCtrl._removeSubscription(clubDbID)
return
oldClub, newClub = self.__club, Club(clubDbID, clubCompactDescr)
self.__club = newClub
if oldClub is None:
self.notify('onClubUpdated', newClub)
elif oldClub.isChanged(newClub):
forEach(lambda c: c(self, oldClub, newClub), self.__comparators)
开发者ID:kblw,项目名称:wot_client,代码行数:13,代码来源:subscriptions.py
示例4: _invoke
def _invoke(self, method, *args):
forEach(operator.methodcaller(method, *args), self.__plugins.itervalues())
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:2,代码来源:plugins.py
示例5: clearNotification
def clearNotification(self):
self.stopNotification()
forEach(operator.methodcaller('clear'), self.__notificators)
self.__notificators = []
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:4,代码来源:scheduled_notifications.py
示例6: stopNotification
def stopNotification(self):
forEach(operator.methodcaller('stopNotification'), self.__notificators)
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:2,代码来源:scheduled_notifications.py
示例7: startNotification
def startNotification(self):
forEach(operator.methodcaller("startNotification"), self.__notificators)
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:2,代码来源:scheduled_notifications.py
示例8: _invoke
def _invoke(self, method, *args):
forEach(operator.methodcaller(method, *args), self._controllers.itervalues())
开发者ID:kblw,项目名称:wot_client,代码行数:2,代码来源:controllers.py
示例9: sendEvent
def sendEvent(eventName, *args, **kwargs):
forEach(lambda mod: _callModMethod(mod, eventName, *args, **kwargs), _mods.itervalues())
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:2,代码来源:__init__.py
示例10: fini
def fini():
forEach(lambda mod: _callModMethod(mod, 'fini'), _mods.itervalues())
_mods.clear()
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:3,代码来源:__init__.py
示例11: init
def init():
global _mods
_mods = _findValidMODs()
forEach(lambda mod: _callModMethod(mod, 'init'), _mods.itervalues())
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:4,代码来源:__init__.py
示例12: __fillOptionalDevices
def __fillOptionalDevices(self, ctrl):
forEach(lambda args: self.__onOptionalDeviceAdded(*args), ctrl.getOrderedOptionalDevicesLayout())
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:2,代码来源:consumables_panel.py
示例13: __fillEquipments
def __fillEquipments(self, ctrl):
forEach(lambda args: self.__onEquipmentAdded(*args), ctrl.getOrderedEquipmentsLayout())
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:2,代码来源:consumables_panel.py
注:本文中的shared_utils.forEach函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论