need fast parser for comma/space delimited numbers

Aahz Maruch aahz at
Sat Mar 18 17:23:58 CET 2000

In article <m2ya7gz7hv.fsf at>,
Les Schaffer  <godzilla at> wrote:
>    def __breakStringOnSpace(self, str):
>	"""break one line str containing numbers in a string format on
>	whitespace (or comma), return array with the strings representing the
>	numbers."""
>        return filter(None, string.splitfields(str, self.splitStr)  )

Why are you using filter?  Why not just

return string.split(str, self.splitStr)
                      --- Aahz (Copyright 2000 by aahz at

Androgynous poly kinky vanilla queer het    <*>
Hugs and backrubs -- I break Rule 6

Three sins: BJ, B&J, B&J  --Aahz

More information about the Python-list mailing list