code: def connect1(self, A, B, distance):
          "Add a link from A to B of given distance, in one direction only."
          self.dict.setdefault(A,{})[B] = distancf connect1(self, A, B, distance):
          "Add a link from A to B of given distance, in one direction only."
          self.dict.setdefault(A,{})[B] = distance
docs: Add a link from A to B of given distance, in one direction only.