HELP. I'm having trouble with ps5. I want to use a method from the superclass, but it doesn't seem to work out. Here's what i did http://pastebin.com/HJyAHGUe
Hi CoolGuy, What language is that? I'm having trouble without braces
python
I would think that: return self.evaluate(story.get_title()) would be all that's needed. When you inherit from a class, it's methods come into the child class's namespace.
i thought that too, but if i do return self.evaluate(story.get_title()) i get an error, saying that a str type doesn't have get_title() attribute
TBH, the posted code is just classes. There's no implementation (running) code, so I can't troubleshoot the problem.
first thing i noticed, when you initialize a newsStory instance why are you specifically converting the bit of the news story to a string? you could just have self.guid = guid etc. in your TitleTrigger class, why are you setting word = self? when you define your is_word_in method, you forgot to add a self in the def line it should look like this: def is_word_in(self, text)
Join our real-time social learning platform and learn together with your friends!