Passing multiple arguments to pool.map using class function
<p>I'm trying to thread as described <a href="https://stackoverflow.com/a/28463266/3899919">in this post</a>, and also pass multiple arguments in Python 2.7 through a work-around described <a href="https://stackoverflow.com/a/5443941/1893275">here</a>. </p>

<p>Right now I have something like this, a function that is part of class <code>pair_scraper</code>:</p>

<pre><code>def pool_threading(self):
        pool = ThreadPool(4)
        for username in self.username_list:
            master_list = pool.map(self.length_scraper2,
                itertools.izip(username*len(self.repo_list),
                itertools.repeat(self.repo_list)))

def length_scraper2(self, username, repo):
    #code
</code></pre>

<p>However, when I run my code I get the error:</p>

<pre><code>TypeError: length_scraper2() takes exactly 3 arguments (2 given)
</code></pre>

<p>Which seems to be because it wants <code>self</code> passed as an argument, which is nonsensical given I'm using a class function within the class. Thoughts on how to fix?</p>