"Alex Hall" <[email protected]> wrote

class parent(object):
def __init__(self, l=None):
 if l is None: l=[]

l is a local variable inside init().

You wanted self.l...

HTH,

--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/



_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to