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


Python HTML.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from html import HTML [as 别名]
# 或者: from html.HTML import __init__ [as 别名]
 def __init__(self):
     #constructor function
     Animal.__init__(self)
     HTML.__init__(self)
     self.title = "The Rabbit"
     self.animal = "Belgian Hare Rabbit"
     self._phylum = "Chordata"
     self._class_ = "Mammalia"
     self._order = "Lagomorpha"
     self._family = "Leporidae"
     self._genus = "Sylvilagus"
     self._url = "images/Rabbit.jpg"
     self._avg_lifespan = "Ten years"
     self._habitat = "Woodlands, Prairies, Deserts."
     self._geo_location = "North, South America, Asia, Europe, Africa, Australia"
     self.sound = "Weening"
     self._body_id = "rabbit"
开发者ID:ctrovato,项目名称:DPWgit,代码行数:19,代码来源:rabbit.py

示例2: __init__

# 需要导入模块: from html import HTML [as 别名]
# 或者: from html.HTML import __init__ [as 别名]
    def __init__(self):
        #constructor functions
        Animal.__init__(self)
        HTML.__init__(self)

        self.__css_url = ""

        self.title = "The Fox"
        self.animal = "Red Fox"
        self._phylum = "Chordata"
        self._class_ = "Mammalia"
        self._order = "Carnivora"
        self.__family = "Canidae"
        self._genus = "Vulpes"
        self._url = "images/foximg.jpg"
        self._avg_lifespan = "Five years"
        self._habitat = "Woodlands"
        self._geo_location = "North America, Asia, Europe Australia"
        self.sound = "Howling"
        self._body_id = "fox"
开发者ID:ctrovato,项目名称:DPWgit,代码行数:22,代码来源:fox.py


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