本文整理汇总了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"
示例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"