What's the difference between doing something calling A.__init__(self) like in the following...
[cdal...@localhost ~]$ python Python 2.4.3 (#1, Oct 1 2006, 18:00:19) [GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class A: ... def __init__(self): ... pass ... >>> class B(A): ... def __init__(self, x): ... A.__init__(self) ... self.x = x ... print x ... >>> x=B(5) 5 >>> y=A(5) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: __init__() takes exactly 1 argument (2 given) >>> y = A() >>> versus something like the following.... [cdal...@localhost ~]$ python Python 2.4.3 (#1, Oct 1 2006, 18:00:19) [GCC 4.1.1 20060928 (Red Hat 4.1.1-28)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class A: ... def __init__(self): ... pass ... >>> class B(A): ... def __init__(self, x): ... self.x = x ... print x ... >>> x = B(5) 5 >>> y = A(5) Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: __init__() takes exactly 1 argument (2 given) >>> y = A() >>> Just curious because the former seems to be common when using the python Thread module. -- http://mail.python.org/mailman/listinfo/python-list