Solved

Keyword arguments everywhere?

LiamByteOP

Should I always call functions with keyword arguments?

0

Comments 4

Join the discussion

Already have an account? Log in

  1. MateoG Solutionreplies: 2

    Not always — for one or two obvious arguments, positional is fine (print(x), len(s)). Use keywords when there are several arguments of the same type that are easy to mix up, like rocket/pad or from/to. That's exactly this challenge's case.

    5
    1. SamPrice

      You can even force keyword-only arguments with * in the signature: def transfer_cargo(cargo_id, *, from_module, to_module).

      6