DEV Community

Discussion on: **kwargs, you got me!

Collapse
saveshodhan profile image
Shodhan Save Author • Edited on

On a side note:

  • if you observe, the key in the kwargs dict has to be the name of the positional argument. So, if status is supposed to be the positional argument, then kwargs is expected to have the same key
  • this also means you cannot have, say, integers type keys as arguments because arguments cannot be integers. The below is not allowed:

def foo(x, 1, **kwargs):