def __init__(self, locations):
if len(locations) < <NUM_LIT:2>:<EOL><INDENT>raise LocationsTooLittle("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT>self.locations = locations<EOL>
Init a polyline with locations

:param locations: locations of ployline
:type locations: list[Location]