On Sun, Sep 21, 2014 at 4:21 PM, Joel Goldstick <[email protected]>
wrote:
>
> Shouldn't it be:  Season(ID, season, serie)?


No, we always have to have 'self' in the first arg.


On Sun, Sep 21, 2014 at 4:25 PM, Danny Yoo <[email protected]> wrote:
>
> Please treat email as asynchronous: sometimes you'll get a response
> within minutes, but sometimes it takes a little longer.
>
> Reading the question quickly... I can't answer this too carefully.  I
> haven't even had breakfast or lunch yet!  :P
>
>
> But there appears to be a type error here.  You're using the name
> "season" in different contexts, where sometimes you mean the season
> number, and in other places, you mean the season object.
> Particularly, you appear to expect the constructor of Episode to take
> in the season *number*, but within the Season constructor, you're
> passing it the season *object*.
>

 Time here is different then =p

And, no, I always treat season as a number, like season 1, 2, 3, ...

In the class Season, I use season twice: on the response, s = season,
giving s the season number. And self.number = season, giving, self.number,
the season number, only that!

And in the class Serie, the line self.season = [Season(ID, season, self)
for season in range(1, self.size + 1)], self.season is the object, and
season is just a random var that I used in the list.
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to