On Sun, Oct 25, 2009 at 10:10 PM, Luke Paireepinart <rabidpoob...@gmail.com>wrote:
> > >> 2- in the final few lines where I assign an object to the class, I notice >> that a parameter was entered in the class name, "Robot(D23)", although when >> defining the class I didn't put any arguments for it. >> > Yes you did, > __init__ takes 2 parameters, "self" and "name". When constructing a new > object via Robot(D23) you are implicitly passing "self" and you are > explicitly passing 'D23' as "self". > Correction, When constructing a new object via Robot(*'D23'*) you are implicitly passing "self" and you are explicitly passing 'D23' as "*name*".
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor