matching and extracting...
Cliff Wells
LogiplexSoftware at earthlink.net
Tue Jan 14 19:14:21 EST 2003
On Tue, 2003-01-14 at 16:10, Cliff Wells wrote:
> def match(self, sequence):
> match = self.re.match(sequence)
> if match:
> for k in self.items:
> self.items[k] = match.group(k)
> return self.items
Damn send key. Should be:
def match(self, sequence):
match = self.re.match(sequence)
if match:
for k in self.items:
self.items[k] = match.group(k)
return self.items
else:
return {}
for the one in a million chance it doesn't match <wink>
--
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308 (800) 735-0555 x308
More information about the Python-list
mailing list