Journal dthable's Journal: [Python] What's with all the semicolons? 1
I'm looking at the
def getIndexItem(self):
# create a summary of the entry
digest = self.body[:self.DIGEST_LEN].replace('\n', '');
digest = self.HTML_STRIP.sub('', digest);
digest = digest.replace('>', '').replace('
When I learned about Python and started to work with it, I was told not to use the semicolons. In fact, I thought that was illegal. Is the parser just throwing them away? Does it have any purpose other than making those C programmers happy?
What happens to them (Score:1)
In the examples you showed, the second statement is just blank. Since blank statements are always allowed... yah, they pretty much get dropped.
With how little optimization Python does though, I wonder if there is a noticeable performance difference!