import re


def parse_points(points_str):
    """Parses the points specification for polyline and polygon
    elements (SVG 1.1, 9.7.1).

    """

    # Treat #-# as # -#
    points_str = points_str.replace('-', ' -')
    return [float(s) for s in re.split("[\x20\x09\x0D\x0A]+|[,]",
      points_str) if s != ""]