当前位置: 首页>>代码示例>>Python>>正文


Python Rules.__init__方法代码示例

本文整理汇总了Python中rules.Rules.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Rules.__init__方法的具体用法?Python Rules.__init__怎么用?Python Rules.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rules.Rules的用法示例。


在下文中一共展示了Rules.__init__方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from rules import Rules [as 别名]
# 或者: from rules.Rules import __init__ [as 别名]
 def __init__(self, page, main):
     """Inits the Container and the claim buffers. Gets the item of a page
      and check if it exists, and if it is already transffered to Wikidata.
     @param page Wikipedia Page object.
     @var self.claims Raw claims as extracted.
     @var self.merged_claims self.claims merged between the languages.
     @var self.validated_claims Merged claims after checks for some
         selected propertys.
     @var self.new_claims Claims, which where not on Wikidata before and
         have no conficts.
     @var self.proceed If the item should be extracted.
     """
     #create variables
     self.lang_claims = []
     self.merged_claims = []
     self.validated_claims = []
     self.new_claims = []
     self.proceed = True
     self.main = main
     #init parents
     pywikibot.ItemPage.__init__(self, page.site, page.title())
     output.Logger.__init__(self)
     Rules.__init__(self)
     self.main = main
     #get the page
     if not self.checkNoItem():
         self.proceed = False
     else:
         self.get()
         #check if the item is untransferred
         if self.checkTransferred():
             self.proceed = False
开发者ID:pyfisch,项目名称:wikibase-statement-bot,代码行数:34,代码来源:containerclass.py

示例2: __init__

# 需要导入模块: from rules import Rules [as 别名]
# 或者: from rules.Rules import __init__ [as 别名]
 def __init__(self):
     Board.__init__(self)
     Actions.__init__(self)
     Rules.__init__(self)
     self.players = {}
     self.turn = 0
     self.game_over = True
开发者ID:ncdesouza,项目名称:GameServer,代码行数:9,代码来源:game.py

示例3: __init__

# 需要导入模块: from rules import Rules [as 别名]
# 或者: from rules.Rules import __init__ [as 别名]
    def __init__(self, parent, code, name, params, contents):
        Rules.__init__(self, parent=parent, code=code, contents=contents)

        self.__name = name
        self.__params = list()

        for param in params:
            param = Param(code=param['code'],
                          name=param['name'],
                          value=param['value'],
                          parent=self)

            self.__params.append(param)
开发者ID:madzak,项目名称:lesscss-python,代码行数:15,代码来源:mixin.py

示例4: __init__

# 需要导入模块: from rules import Rules [as 别名]
# 或者: from rules.Rules import __init__ [as 别名]
    def __init__(self, parent, code, names=None, contents=None):
        Rules.__init__(self, parent=parent, code=code, contents=contents)

        self.__names = names
开发者ID:madzak,项目名称:lesscss-python,代码行数:6,代码来源:selector.py

示例5: __init__

# 需要导入模块: from rules import Rules [as 别名]
# 或者: from rules.Rules import __init__ [as 别名]
    def __init__(self, parent, code, media, contents=None):
        Rules.__init__(self, parent=parent, code=code, contents=contents)

        self.__media = media
开发者ID:madzak,项目名称:lesscss-python,代码行数:6,代码来源:media.py


注:本文中的rules.Rules.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。