It may be more robust to use port_asgn_info.get("value", "") - otherwise you always need all three values set. Is this necessary?