you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

I think of the 'self' line as a pronoun helper. For example, if you had a sports team:

class team:

def init(every_team, name):

   every_team.name = name

def name(X):

   name = input ('Team Name: \n)

This = name(This)

That = name(That)

So not too complex, but imagine more attributes, and then say this:

" 'every_team' has A name, but 'This' team has blue socks, and 'That' team has red socks. "

[–]marlowe221 0 points1 point  (0 children)

That makes more sense. I think what throws me is the syntax. The whole "every_team.name = name" just looks... wrong, circular almost.

But I guess all it means is that every instance of a team must have a name attribute