From 5d9d1e1968dcde229319ef7b541aab4fe25e8680 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 19 Oct 2001 00:09:51 +0000 Subject: [PATCH] Slight speed ups in the parser svn: r481 --- src/GrampsParser.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/GrampsParser.py b/src/GrampsParser.py index 019f82e90..812b0135f 100644 --- a/src/GrampsParser.py +++ b/src/GrampsParser.py @@ -55,11 +55,12 @@ u2l = utf8_to_latin # Remove extraneous spaces # #------------------------------------------------------------------------- + +def rs(text): + return string.join(string.split(text)) + def fix_spaces(text_list): - val = "" - for text in text_list: - val = val + string.join(string.split(text),' ') + "\n" - return val + return string.join(map(rs,text_list),'\n') #------------------------------------------------------------------------- # @@ -639,7 +640,7 @@ class GrampsParser(handler.ContentHandler): if self.address: self.address.setDate(u2l(tag)) else: - self.event.date.quick_set(u2l(tag)) + self.event.setDate(u2l(tag)) #--------------------------------------------------------------------- #