Explorar o código

amend return format

chenhaiyang %!s(int64=5) %!d(string=hai) anos
pai
achega
d3357e1632
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      adjacent.py

+ 3 - 1
adjacent.py

@@ -42,8 +42,10 @@ def calc_adjacent_relation(columns, segments, v_walls, walls):
                         space_relation.update(binary_space_relations)
 
     relations = []
+    result_key = ['from', 'to']
     for relation in space_relation:
-        relations.append(relation)
+        temp = dict(zip(result_key, relation.split('@')))
+        relations.append(temp)
 
     return relations