subclass urllib2
monkeys paw
monkey at joemoney.net
Mon Feb 28 13:53:44 EST 2011
I'm trying to subclass urllib2 in order to mask the
version attribute. Here's what i'm using:
import urllib2
class myURL(urllib2):
def __init__(self):
urllib2.__init__(self)
self.version = 'firefox'
I get this>
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
TypeError: Error when calling the metaclass bases
module.__init__() takes at most 2 arguments (3 given)
I don't see where i am supplying 3 arguments. What am i
missing?
More information about the Python-list
mailing list