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

python - rpy2 import is not working -

javascript - How to get MySQL query result returned using $.ajax -

javascript - How to use the code plugin with popcornjs -