title: python: overriding an imported class to extend functionality
body: <p>I am running some code below:</p>
  
  <pre><code>import tweepy
  # https://github.com/tweepy/tweepy
  
  auth = tweepy.OAuthHandler(keys['consumer_key'], keys['consumer_secret'])
  auth.set_access_token(keys['access_token'], keys['access_token_secret'])
  api = tweepy.API(auth)
  .
  .
  tweets = api.statuses_lookup(id_batch)
  </code></pre>
  
  <p>i want to extend the functionality of tweepy via my code (rather than wait for tweepy github to to be updated with the same functionality) and add an extra argument to the last line (tweet_mode = 'extended')</p>
  
  <p>I was looking into override two particular functions of a certain class in tweepy. The new functions would be exactly the same as the original except for an additional variable</p>
  
  <p>i created a new customtweepy.py and inside (and i just added the tweet_mode stuff):</p>
  
  <pre><code>from tweepy import *
  
  
  def statuses_lookup(self, id_, include_entities=None,
                  trim_user=None, map_=None, tweet_mode=None):
  from tweepy.utils import list_to_csv
  return self._statuses_lookup(list_to_csv(id_), include_entities,
                               trim_user, map_, tweet_mode)
  
  
  @property
  def _statuses_lookup(self):
  """ :reference: https://dev.twitter.com/rest/reference/get/statuses/lookup
      :allowed_param:'id', 'include_entities', 'trim_user', 'map', 'tweet_mode'
  """
  from tweepy.binder import bind_api
  return bind_api(
      api=self,
      path='/statuses/lookup.json',
      payload_type='status', payload_list=True,
      allowed_param=['id', 'include_entities', 'trim_user', 'map', 'tweet_mode'],
      require_auth=True
  )
  </code></pre>
  
  <p>i want customtweepy to act exactly like tweepy does except when i call:</p>
  
  <pre><code>tweets = api.statuses_lookup(id_batch, tweet_mode='extended')
  </code></pre>
  
  <p>it will use the function from my customtweepy instead</p>
  
  <p>but when i replace tweepy and just import customtweepy:</p>
  
  <pre><code>import customtweepy
  # https://github.com/tweepy/tweepy
  
  auth = customtweepy.OAuthHandler(keys['consumer_key'], keys['consumer_secret'])
  auth.set_access_token(keys['access_token'], keys['access_token_secret'])
  api = customtweepy.API(auth)
  .
  .
  tweets = api.statuses_lookup(id_batch, tweet_mode='extended')
  #added extra argument 
  </code></pre>
  
  <p>i get the below error:</p>
  
  <pre><code>tweets = api.statuses_lookup(id_batch, tweet_mode='extended')
  TypeError: statuses_lookup() got an unexpected keyword argument 'tweet_mode'
  </code></pre>