當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。