Re: [Tutor] how to pass data to aother function from a class?

2010-02-02 Thread Kent Johnson
On Tue, Feb 2, 2010 at 8:04 AM, Zheng Jiekai wrote: > I'm beginning my python learning. My python version is 3.1 > > I‘v never learnt OOP before. > So I'm confused by the HTMLParser > > Here's the code: from html.parser import HTMLParser class parser(HTMLParser): > def handle_data(self,

[Tutor] how to pass data to aother function from a class?

2010-02-02 Thread Zheng Jiekai
I'm beginning my python learning. My python version is 3.1 I‘v never learnt OOP before. So I'm confused by the HTMLParser Here's the code: >>> from html.parser import HTMLParser >>> class parser(HTMLParser): def handle_data(self, data): print(data) >>> p = parser() >>> page = """TitleI'