On Jan 16, 2005, at 9:08 AM, bwobbones wrote:
class two(one):
def __init__(self):
print two
You need to specifically call the superclass's __init__ here in order
for it to fire. Just add the line
super(two, self).__init__()
as the first line of the subclass's __init__.
bwobbones wrote:
Hi all,
I'm a java programmer struggling to come to terms with python - bear
with me!
Welcome!
I'm trying to subclass a class, and I want to be able to see it's
attributes also. Here are my classes:
[snip]
class two(one):
def __init__(self):
print two
The problem is
In article [EMAIL PROTECTED],
Ed Leafe [EMAIL PROTECTED] wrote:
On Jan 16, 2005, at 9:08 AM, bwobbones wrote:
class two(one):
def __init__(self):
print two
You need to specifically call the superclass's __init__ here in order
for it to fire. Just add the line
On Sun, 16 Jan 2005 22:08:13 +0800, bwobbones wrote:
Hi all,
I'm a java programmer struggling to come to terms with python - bear
with me!
Christophe already identified the problem, I wanted to address another
Javaism in your code, for your educational benefit.
Speaking idiomatically