On 3 Feb 2006 03:59:10 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I still see "newbie-friendliness" as a > > MAJOR plus for Python -- it increases the chance that users > > of your software will become contributors. > > Yes, I 100% agree to that point! > But the point is, the current situation is not newbie-friendly (I can > tell, I am a newbie): I declare a method with 3 parameters but when I > call it I only pass 2 parameters. That's confusing. If I declare a > member variable, I write: "self.x = ValueForX", why can't I be equally > explicit for declaring member functions?
I have to say that as a newbie, it took me quite a while to get my head around that extra parameter (self). It took me ages to work out that: class A: def __init__(self, foo): self.foo = foo a = A("hello") is actually a shortcut for: a = A(a, "Hello") or even: a = new A(a, "Hello") I think insisting on: a = A(a, "Hello") would be very good for readability, understandability and newbie-friendliness. Ed _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor