Skip to content

Instantly share code, notes, and snippets.

@ohpauleez
Created August 26, 2010 18:05
Show Gist options
  • Save ohpauleez/551879 to your computer and use it in GitHub Desktop.
Save ohpauleez/551879 to your computer and use it in GitHub Desktop.
args_that_need_validation = ["one", "two", "three"]
def newStudy(**kwargs):
for key in kwargs:
if (key in args_that_need_validation) and not kwargs[key]:
raise Exception("You don't have %s" % str(key))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment