Re: [Tutor] making a list of a custom object

2014-09-20 Thread Steven D'Aprano
Hi Kate, and welcome! My replies are interleaved between your questions. On Fri, Sep 19, 2014 at 04:25:50PM -0500, Kate Reeher wrote: > I have a custom class called Game, and it has a variable called > "goals". I'd like to make this a list of custom objects, with various > information about t

Re: [Tutor] making a list of a custom object

2014-09-20 Thread Dave Angel
Kate Reeher Wrote in message: > I have a custom class called Game, and it has a variable called "goals". I'd > like > to make this a list of custom objects, with various information about the > goals. > class Game: > goals = {} That's a class attribute; the others below are instance a

[Tutor] making a list of a custom object

2014-09-20 Thread Kate Reeher
I have a custom class called Game, and it has a variable called "goals". I'd like to make this a list of custom objects, with various information about the goals. class Game: goals = {} class Goal(object): def __init__(self,time,goal_by,assist_by,team,is_powerplay ):