bwobbones wrote:
> Hi all,
>
> I'm a java programmer struggling to come to terms with python - bear
> with me!
>
> I'm trying to subclass a class, and I want to be able to see it's
> attributes also. Here are my classes:
>
> two.py
> *
> from one import one
>
>
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 "idiomaticall
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
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 i
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__.
__
Hi all,
I'm a java programmer struggling to come to terms with python - bear
with me!
I'm trying to subclass a class, and I want to be able to see it's
attributes also. Here are my classes:
one.py:
*
class one:
def __init__(self):
print "one"
self