Correct me if I'm wrong but since port is defaulted to 5000 if not present then the if always true and can be safely omitted, hence the concatenation moved into the final expression.
Can port be empty or whitespace string? I.e. be present in the dictionary and not default to 5000. Then the if is necessary and the PR is void and null.
Correct me if I'm wrong but since
port
is defaulted to5000
if not present then theif
always true and can be safely omitted, hence the concatenation moved into the final expression.