On Mon, Jun 23, 2008 at 7:22 PM, Ricardo Araoz <[EMAIL PROTECTED]> wrote:
> Kent Johnson wrote:
>>
>> On Sun, Jun 22, 2008 at 3:50 PM, Zameer Manji <[EMAIL PROTECTED]> wrote:
>>> Also what do you mean by 'accessors' for Neighbors ?
>>
>> class User(object):
>>  ...
>>  def getNeighbors():
>>    """ Returns a list of this user's neighbors """
>>
>> and similar for getTopArtists(), etc.
>>
>
> A couple of caveats though.
> Don't forget "self", it should be :
>
> class User (object):
>    def __init__(self):
>        self.UserProfile = UserProfile('Bob')
>
>
> Passing 'Bob' to __init__ would be :
>
> class User (object):
>    def __init__(self, User='Bob'):
>        self.UserProfile = UserProfile(User)

Good catch; also
  def getNeighbors(self):

Kent
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to