1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務時間:8:30-17:00
      你可能遇到了下面的問題
      關閉右側工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      python文檔測試:doctest

      doctest作用:會把文檔中注釋的代碼提取并進行測試。

      成都創(chuàng)新互聯(lián)公司專注于霍州網(wǎng)站建設服務及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗。 熱誠為您提供霍州營銷型網(wǎng)站建設,霍州網(wǎng)站制作、霍州網(wǎng)頁設計、霍州網(wǎng)站官網(wǎng)定制、小程序定制開發(fā)服務,打造霍州網(wǎng)絡公司原創(chuàng)品牌,更為您提供霍州網(wǎng)站排名全網(wǎng)營銷落地服務。

      #!/usr/bin/python
      # -*- coding: utf-8 -*-
      
      class Dict(dict):    
      '''    
          Simple dict but also support access as x.y style.    
          >>> d1 = Dict()    
          >>> d1['x'] = 100    
          >>> d1.x    
          100    
          >>> d1.y = 200    
          >>> d1['y']    
          200    
          >>> d2 = Dict(a=1, b=2, c='3')    
          >>> d2.c    
          '3'    
          >>> d2['empty']    
          Traceback (most recent call last):    
              ...    
          KeyError: 'empty'    
          >>> d2.empty    
          Traceback (most recent call last):    
              ...    
          AttributeError: 'Dict' object has no attribute 'empty'    
          '''    
      def __init__(self, **kw):    
      super(Dict, self).__init__(**kw)    
      def __getattr__(self, key):    
      try:    
      return self[key]    
      except KeyError:    
      raise AttributeError(r"'Dict' object has no attribute '%s'" % key)    
      def __setattr__(self, key, value):    
      self[key] = value    
      if __name__=='__main__':    
      import doctest    
      doctest.testmod()

      什么也沒有輸出,證明程序正確。


      網(wǎng)頁名稱:python文檔測試:doctest
      分享地址:http://ef60e0e.cn/article/gecejj.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        长子县| 临漳县| 张北县| 封丘县| 大邑县| 台东市| 茌平县| 内乡县| 容城县| 凌海市| 中方县| 蒲江县| 五家渠市| 岢岚县| 巍山| 饶平县| 林州市| 桦甸市| 翁源县| 桃江县| 陆丰市| 冕宁县| 施秉县| 宁化县| 吉隆县| 旅游| 朝阳区| 岗巴县| 壤塘县| 鄂伦春自治旗| 阳东县| 利津县| 淮南市| 冀州市| 伊宁市| 冀州市| 大安市| 铁力市| 吉木萨尔县| 彰化县| 咸宁市|