<legend id='QWsmi'><style id='QWsmi'><dir id='QWsmi'><q id='QWsmi'></q></dir></style></legend>

      1. <tfoot id='QWsmi'></tfoot>

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

        <small id='QWsmi'></small><noframes id='QWsmi'>

      2. 双等于vs在python中

        double equals vs is in python(双等于vs在python中)
          <legend id='R8U5m'><style id='R8U5m'><dir id='R8U5m'><q id='R8U5m'></q></dir></style></legend>

            • <i id='R8U5m'><tr id='R8U5m'><dt id='R8U5m'><q id='R8U5m'><span id='R8U5m'><b id='R8U5m'><form id='R8U5m'><ins id='R8U5m'></ins><ul id='R8U5m'></ul><sub id='R8U5m'></sub></form><legend id='R8U5m'></legend><bdo id='R8U5m'><pre id='R8U5m'><center id='R8U5m'></center></pre></bdo></b><th id='R8U5m'></th></span></q></dt></tr></i><div id='R8U5m'><tfoot id='R8U5m'></tfoot><dl id='R8U5m'><fieldset id='R8U5m'></fieldset></dl></div>
                <tbody id='R8U5m'></tbody>
              <tfoot id='R8U5m'></tfoot>
                <bdo id='R8U5m'></bdo><ul id='R8U5m'></ul>

                1. <small id='R8U5m'></small><noframes id='R8U5m'>

                  本文介绍了双等于vs在python中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 Python 解释器中运行以下命令:

                  I run the following in the Python interpreter:

                  >>> foo = 10
                  >>> dir(foo) == dir(10)
                  True
                  >>> dir(foo) is dir(10)
                  False
                  >>> 
                  

                  这是为什么?

                  推荐答案

                  is 检查 2 个参数是否引用同一个对象,== 检查 2 个参数是否具有相同的值.dir() 返回一个 list,其中包含 foo10 的相同数据,但实际的 >list 两件事的实例是不同的.

                  is checks that 2 arguments refer to the same object, == checks that 2 arguments have the same value. dir() returns a list which contains the same data for both foo and 10, but the actual list instances for the 2 things are different.

                  这篇关于双等于vs在python中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Initialize Multiple Numpy Arrays (Multiple Assignment) - Like MATLAB deal()(初始化多个 Numpy 数组(多重赋值) - 像 MATLAB deal())
                  How to extend Python class init(如何扩展 Python 类初始化)
                  What#39;s the difference between dict() and {}?(dict() 和 {} 有什么区别?)
                  What is a wrapper_descriptor, and why is Foo.__init__() one in this case?(什么是 wrapper_descriptor,为什么 Foo.__init__() 在这种情况下是其中之一?)
                  Initialize list with same bool value(使用相同的布尔值初始化列表)
                  setattr with kwargs, pythonic or not?(setattr 与 kwargs,pythonic 与否?)
                  1. <legend id='Vm6RU'><style id='Vm6RU'><dir id='Vm6RU'><q id='Vm6RU'></q></dir></style></legend>
                    <i id='Vm6RU'><tr id='Vm6RU'><dt id='Vm6RU'><q id='Vm6RU'><span id='Vm6RU'><b id='Vm6RU'><form id='Vm6RU'><ins id='Vm6RU'></ins><ul id='Vm6RU'></ul><sub id='Vm6RU'></sub></form><legend id='Vm6RU'></legend><bdo id='Vm6RU'><pre id='Vm6RU'><center id='Vm6RU'></center></pre></bdo></b><th id='Vm6RU'></th></span></q></dt></tr></i><div id='Vm6RU'><tfoot id='Vm6RU'></tfoot><dl id='Vm6RU'><fieldset id='Vm6RU'></fieldset></dl></div>
                      <tbody id='Vm6RU'></tbody>

                        <small id='Vm6RU'></small><noframes id='Vm6RU'>

                        • <tfoot id='Vm6RU'></tfoot>
                          • <bdo id='Vm6RU'></bdo><ul id='Vm6RU'></ul>