• <legend id='72jaP'><style id='72jaP'><dir id='72jaP'><q id='72jaP'></q></dir></style></legend>

        <small id='72jaP'></small><noframes id='72jaP'>

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

        Python命名中尾随下划线有什么好处?

        时间:2023-09-10
        <i id='ZxDQ8'><tr id='ZxDQ8'><dt id='ZxDQ8'><q id='ZxDQ8'><span id='ZxDQ8'><b id='ZxDQ8'><form id='ZxDQ8'><ins id='ZxDQ8'></ins><ul id='ZxDQ8'></ul><sub id='ZxDQ8'></sub></form><legend id='ZxDQ8'></legend><bdo id='ZxDQ8'><pre id='ZxDQ8'><center id='ZxDQ8'></center></pre></bdo></b><th id='ZxDQ8'></th></span></q></dt></tr></i><div id='ZxDQ8'><tfoot id='ZxDQ8'></tfoot><dl id='ZxDQ8'><fieldset id='ZxDQ8'></fieldset></dl></div>
        <tfoot id='ZxDQ8'></tfoot>
            <tbody id='ZxDQ8'></tbody>
        1. <small id='ZxDQ8'></small><noframes id='ZxDQ8'>

        2. <legend id='ZxDQ8'><style id='ZxDQ8'><dir id='ZxDQ8'><q id='ZxDQ8'></q></dir></style></legend>

            <bdo id='ZxDQ8'></bdo><ul id='ZxDQ8'></ul>

                  本文介绍了Python命名中尾随下划线有什么好处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我习惯用这种方式命名 Python 参数:

                  I am used to naming Python arguments in this way:

                  my_argument='foo'
                  

                  如果我这样做有什么好处:

                  what's the advantage if I do this instead:

                  my_argument_='foo" 
                  

                  按照 PEP008 的建议?

                  as is recommended by PEP008?

                  尾随下划线一定有充分的理由,那是什么?

                  There must be a good reason for the trailing underscore, so what is it?

                  推荐答案

                  正是它在 PEP 中提供的内容:它允许您使用原本会是 Python 关键字的东西.

                  Exactly what it gives in the PEP: it allows you to use something that would otherwise be a Python keyword.

                  as_
                  with_
                  for_
                  in_
                  

                  这篇关于Python命名中尾随下划线有什么好处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:RDFLib:XML 序列化中的命名空间前缀 下一篇:从函数内将变量插入全局命名空间?

                  相关文章

                  最新文章

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

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