Solved

**fields keeps the order of arguments?

LiamByteOP

Will valve=2 always come before pressure_kpa=310?

11

Comments 4

Join the discussion

Already have an account? Log in

  1. SophieDev Solutionreplies: 2

    Yes, since Python 3.7 **kwargs preserves the order in which keyword arguments were passed (and dicts preserve insertion order). So the output order matches the call.

    8
    1. CharlieH

      Stage 2 unpacking a dict with **reading is how structured logging libraries work under the hood.

      5