retriving python objects ...python newbie
        Posted  
        
            by gizgok
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by gizgok
        
        
        
        Published on 2010-03-16T07:27:07Z
        Indexed on 
            2010/03/16
            7:46 UTC
        
        
        Read the original article
        Hit count: 333
        
python
I have a Club class and Player Class.The player class has an attribute Fav.clubs which will have unique club values.So the user is suppose to enter various club names.Based on the club names I have to retrieve those club objects and establish the relationship that this particular player has this Fav.clubs.The attribute Fav.clubs in Player class should store the names of Club .Now what I have to do is,take input from user about fav.clubs.This will be a list.After that traverse each element in the list and acc to string name find the corresponding club object and then store that object instance in Player class.
© Stack Overflow or respective owner