python - How to check all the kwargs that could be passed on to a function -


Assume that I have the following functions (in this case the constructor),

  __ Init __ (self, url, ** kwargs)  

How can I check all possible keyword arguments that can pass this function?

Thank you, Y

If you want to do this, check it out Whether the supplied keywords are from a valid set of keywords, like you can use:

  valid_keywords = set (['keyword1', 'keyword2']) are_keywords_ok = No (set (kwargs) - valid_keywords)  

Comments

Popular posts from this blog

scala - Play Framework - how to bind form to a session field -

c++ - Why does Visual Studio Release build break on non-executing code line -

javascript - parsing json not working -