How do I extend a python module? Adding new functionality to the `python-twitter` package

A few ways. The easy way: Don’t extend the module, extend the classes. exttwitter.py import twitter class Api(twitter.Api): pass # override/add any functions here. Downside : Every class in twitter must be in exttwitter.py, even if it’s just a stub (as above) A harder (possibly un-pythonic) way: Import * from python-twitter into a module that … Read more