久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='2aNXk'><style id='2aNXk'><dir id='2aNXk'><q id='2aNXk'></q></dir></style></legend>

  • <tfoot id='2aNXk'></tfoot>

    <small id='2aNXk'></small><noframes id='2aNXk'>

    • <bdo id='2aNXk'></bdo><ul id='2aNXk'></ul>

    <i id='2aNXk'><tr id='2aNXk'><dt id='2aNXk'><q id='2aNXk'><span id='2aNXk'><b id='2aNXk'><form id='2aNXk'><ins id='2aNXk'></ins><ul id='2aNXk'></ul><sub id='2aNXk'></sub></form><legend id='2aNXk'></legend><bdo id='2aNXk'><pre id='2aNXk'><center id='2aNXk'></center></pre></bdo></b><th id='2aNXk'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='2aNXk'><tfoot id='2aNXk'></tfoot><dl id='2aNXk'><fieldset id='2aNXk'></fieldset></dl></div>

      1. python __all__ 模塊級變量有什么用?

        What#39;s the python __all__ module level variable for?(python __all__ 模塊級變量有什么用?)

          <tbody id='0QZYO'></tbody>
        • <small id='0QZYO'></small><noframes id='0QZYO'>

              <i id='0QZYO'><tr id='0QZYO'><dt id='0QZYO'><q id='0QZYO'><span id='0QZYO'><b id='0QZYO'><form id='0QZYO'><ins id='0QZYO'></ins><ul id='0QZYO'></ul><sub id='0QZYO'></sub></form><legend id='0QZYO'></legend><bdo id='0QZYO'><pre id='0QZYO'><center id='0QZYO'></center></pre></bdo></b><th id='0QZYO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='0QZYO'><tfoot id='0QZYO'></tfoot><dl id='0QZYO'><fieldset id='0QZYO'></fieldset></dl></div>
              1. <legend id='0QZYO'><style id='0QZYO'><dir id='0QZYO'><q id='0QZYO'></q></dir></style></legend>

                <tfoot id='0QZYO'></tfoot>
                  <bdo id='0QZYO'></bdo><ul id='0QZYO'></ul>
                  本文介紹了python __all__ 模塊級變量有什么用?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我在 python/Lib 源代碼中看到了很多,但我不知道它是干什么用的.

                  I've seen it a lot in python/Lib source code but I don't know what it is for.

                  我認為它用于限制模塊的可訪問成員.所以只有 __all__ 處的元素會在 dir(module) 時出現.

                  I thought it was used to limit accessible members of of a module. So only the elements at __all__ will show up when dir(module).

                  我做了一個小例子,發現它沒有按預期工作.

                  I did a little example and saw it was not working as I expected.

                  那么... python __all__ 模塊級變量是干什么用的?

                  So... What's the python __all__ module level variable for?

                  推薦答案

                  它有兩個目的:

                  1. 任何閱讀源代碼的人都會知道公開的公共 API 是什么.它不會阻止他們在私有聲明中四處尋找,但確實提供了一個很好的警告.

                  1. Anybody who reads the source will know what the exposed public API is. It doesn't prevent them from poking around in private declarations, but does provide a good warning not to.

                  使用 from mod import * 時,只會導入 __all__ 中列出的名稱.在我看來,這并不重要,因為導入所有內容真的是個壞主意.

                  When using from mod import *, only names listed in __all__ will be imported. This is not as important, in my opinion, because importing everything is a really bad idea.

                  這篇關于python __all__ 模塊級變量有什么用?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)
                      <bdo id='4Hpro'></bdo><ul id='4Hpro'></ul>

                              <tbody id='4Hpro'></tbody>
                          • <small id='4Hpro'></small><noframes id='4Hpro'>

                          • <legend id='4Hpro'><style id='4Hpro'><dir id='4Hpro'><q id='4Hpro'></q></dir></style></legend>

                            <i id='4Hpro'><tr id='4Hpro'><dt id='4Hpro'><q id='4Hpro'><span id='4Hpro'><b id='4Hpro'><form id='4Hpro'><ins id='4Hpro'></ins><ul id='4Hpro'></ul><sub id='4Hpro'></sub></form><legend id='4Hpro'></legend><bdo id='4Hpro'><pre id='4Hpro'><center id='4Hpro'></center></pre></bdo></b><th id='4Hpro'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4Hpro'><tfoot id='4Hpro'></tfoot><dl id='4Hpro'><fieldset id='4Hpro'></fieldset></dl></div>
                            <tfoot id='4Hpro'></tfoot>
                          • 主站蜘蛛池模板: 亚洲 中文 欧美 日韩 在线观看 | 亚洲国产成人精品久久久国产成人一区 | 日本特黄特色aaa大片免费 | 亚洲aⅴ| 成人av网站在线观看 | 成人国产精品一级毛片视频毛片 | 黄色片av | 色婷婷久久久亚洲一区二区三区 | 精品久久久久久久久亚洲 | 91在线免费视频 | 奇米四色影视 | 亚洲日本欧美日韩高观看 | 国产永久免费 | 欧洲精品码一区二区三区免费看 | 久久一区二区视频 | 国产精品高潮呻吟久久 | 超碰免费在线 | 91精品国产欧美一区二区成人 | 久草新在线 | 国产成人av电影 | 亚州一区二区三区 | 国产亚韩 | www午夜视频 | 亚洲色图插插插 | 激情六月丁香婷婷 | 亚洲精品视频播放 | 精品久久国产老人久久综合 | 亚洲精品一区二区三区蜜桃久 | h漫在线观看 | 日日摸日日爽 | 亚洲欧美一区二区三区在线 | 日本福利视频免费观看 | 国产伦一区二区三区视频 | 久久99网 | 色接久久 | 精品视频一区二区三区四区 | 日日夜夜狠狠操 | 中文字幕在线观看视频网站 | 久久久123 | 97久久精品午夜一区二区 | 日韩精品视频一区二区三区 |