[Tutor] Re: newbie question

Alan Gauld alan.gauld@freenet.co.uk
Tue, 11 Jul 2000 17:01:03 +0000


Hi, Just back from a short vacation and found your 
query....

> Now my question is why it is necessary to add 
> the sentences = sentences +...
> and clauses = clauses +... lines? Why not just:
>
> self.c_sentence = self.c_sentence + self.c_punctuation[c]

Nope, I don't know why I used a local variable 
- I don't in the non OO version. Maybe I was tired!

Another poster generously suggested it was a 
possible performance improvement but I honestly 
doubt I was that alert. It certainly doesn't help 
a newbie...

I'll change it in the next update to the site, 
thanks for pointing it out! (If I do find a valid 
reason I'll let you know!)

That whole case study is getting a revisited as part 
of my book project, so that should get reflected 
back into the web site,

The good news is that the fact you raised the question 
shows you have picked up a lot about programming Python! 
:-)

Thanks agan,

Alan G.