buses.py

changeset 41
4354d459c231
parent 31
60045b362d71
child 42
0b53b7c70875
equal deleted inserted replaced
40:06000662d87b 41:4354d459c231
306 for bus_stop in bus_stops.values(): 306 for bus_stop in bus_stops.values():
307 bus_stops_by_name[bus_stop.name].add(bus_stop) 307 bus_stops_by_name[bus_stop.name].add(bus_stop)
308 bus_stops_by_name = dict(bus_stops_by_name) 308 bus_stops_by_name = dict(bus_stops_by_name)
309 309
310 # ryhmittele bus_stops nimen mukaan 310 # ryhmittele bus_stops nimen mukaan
311 global all_clusters
311 all_clusters = [] 312 all_clusters = []
312 def cluster_bus_stops(): 313 def cluster_bus_stops():
313 sorted_bus_stops = sorted(bus_stops.values(), key = lambda bus_stop: bus_stop.name) 314 sorted_bus_stops = sorted(bus_stops.values(), key = lambda bus_stop: bus_stop.name)
314 for bus_stop in sorted_bus_stops: 315 for bus_stop in sorted_bus_stops:
315 if not bus_stop.cluster: 316 if not bus_stop.cluster:

mercurial