- "all", in which case a list of all the specified state is provided
if not isinstance(veh_id, str):
return [self.__vehicles[vehID]["length"]
for vehID in veh_id]
elif veh_id == "all":
return [self.__vehicles[vehID]["length"]
for vehID in self.__ids]
After Change
- "all", in which case a list of all the specified state is provided
if isinstance(veh_id, list):
return [self.get_length(vehID) for vehID in veh_id]
return self.__vehicles.get(veh_id, {}).get("length", 0)
def get_acc_controller(self, veh_id="all"):