[Teammetrics-discuss] List archives -- improving an existing metric.

Andreas Tille andreas at an3as.eu
Thu Jun 30 14:40:49 UTC 2011


On Thu, Jun 30, 2011 at 07:29:49PM +0530, Sukhbir Singh wrote:
> > As I said s/--/^-- $/ to make definitely sure you fetch the signature
> > and not some random '--' or even '^--' which might something else than a
> > signature separator.
> 
> Yes, don't worry :-) I have taken care of this because it is a list.
> 
> This works:
> 
> >>> l = ['First line', 'Second Line', '--', 'Fourth Line']
> >>> l[:l.index('--')]
> ['First line', 'Second Line']

But ist is *wrong* It should be:

>>> l = ['First line', 'Second Line', '-- ', 'Fourth Line'] 

Please mind the trailing blank.  The string which separates a signature
from the text is '^-- $' *including* exactly one blank after the '--'.
I admit this might not have some practical relevance but you said you
would be aiming to perfectness ...

Kind regards

        Andreas. 

-- 
http://fam-tille.de



More information about the Teammetrics-discuss mailing list