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

      • <bdo id='5GhE7'></bdo><ul id='5GhE7'></ul>

      1. <tfoot id='5GhE7'></tfoot>

      2. <small id='5GhE7'></small><noframes id='5GhE7'>

        TypeError:worker() 接受 0 个位置参数,但给出了 1 个

        TypeError: worker() takes 0 positional arguments but 1 was given(TypeError:worker() 接受 0 个位置参数,但给出了 1 个)
          <tbody id='zLKgV'></tbody>
          • <bdo id='zLKgV'></bdo><ul id='zLKgV'></ul>

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

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

                  本文介绍了TypeError:worker() 接受 0 个位置参数,但给出了 1 个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试实现一个子类,但它会抛出错误:

                  I'm trying to implement a subclass and it throws the error:

                  TypeError: worker() 接受 0 个位置参数,但给出了 1 个

                  class KeyStatisticCollection(DataDownloadUtilities.DataDownloadCollection):
                      def GenerateAddressStrings(self):
                          pass    
                      def worker():
                          pass
                      def DownloadProc(self):
                          pass
                  

                  推荐答案

                  你的 worker 方法需要 'self' 作为参数,因为它是类方法而不是函数.添加它应该可以正常工作.

                  Your worker method needs 'self' as a parameter, since it is a class method and not a function. Adding that should make it work fine.

                  这篇关于TypeError:worker() 接受 0 个位置参数,但给出了 1 个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Split a Pandas column of lists into multiple columns(将 Pandas 的列表列拆分为多列)
                  How does the @property decorator work in Python?(@property 装饰器在 Python 中是如何工作的?)
                  What is the difference between old style and new style classes in Python?(Python中的旧样式类和新样式类有什么区别?)
                  How to break out of multiple loops?(如何打破多个循环?)
                  How to put the legend out of the plot(如何将传说从情节中剔除)
                  Why is the output of my function printing out quot;Nonequot;?(为什么我的函数输出打印出“无?)

                  <legend id='CaTYc'><style id='CaTYc'><dir id='CaTYc'><q id='CaTYc'></q></dir></style></legend>
                1. <small id='CaTYc'></small><noframes id='CaTYc'>

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

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