clips/pattern — pull request #41 by sloria (2013-07-03 19:12:13+00:00)
Title: Use new-style classes in pattern.web

...for easier subclassing in Python 2.*.

I tried to subclass Spider, calling `super` in the `__init__` method:

from pattern.web import Spider

class MySpider(Spider):
def __init__(self, *args, **kwargs):
...
super(MySpider, self).__init__(*args, **kwargs)

But the call to `super` resulted in a `TypeError`:

TypeError: must be type, not classobj

This is due to the difference in behavior between "new-style" classes (which explicitly subclass `object`) and "old-style" classes. `super` does not work with "old-style" classes in Python 2.* ([source](http://stackoverflow.com/questions/1713038/super-fails-with-error-typeerror-argument-1-must-be-type-not-classobj)).

This patch makes the classes defined in `pattern.web.__init__` explicitly subclass `object`.