Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>TypeError</code> has nothing to do with your definition, but with your call:</p> <pre><code>ids = MyApi.GetFollowerIDs( screen_name=options['username'], cursor=cursor, count=options['batch-size'], total_count=options['total'], ) </code></pre> <p><code>GetFollowerIDs</code> is an instance method—that's why it takes a <code>self</code> parameter. So you have to call it on an instance of the class, not the class itself.</p> <p>The API documentation samples show how to properly create and use an instance of <code>twitter.API</code>; you'll do the exact same thing, except to create and use an instance of <code>MyApi</code> instead.</p> <p>You also may want to read the tutorial on <a href="http://docs.python.org/2/tutorial/classes.html" rel="nofollow">Classes</a>, or some third-party tutorial, if this isn't obvious once pointed out.</p> <hr> <p>Meanwhile, within the method, you're calling the base class properly via <code>super</code>… but that isn't going to let you access local variables from the base class method. Local variables are local; they only live while the method is running. So, after the base class method returns, they don't even exist anymore.</p> <p>The reason your IDE is saying they aren't defined is that they really aren't defined, except within the implementation of that method.</p> <p>If you really need to access the internal state of the method's implementation, the only reasonable workaround would be to copy that method's implementation to your code, instead of calling the method.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload