Created
June 19, 2017 06:21
-
-
Save chankeypathak/b88ea4894c63c69c3c070f5f71dc4382 to your computer and use it in GitHub Desktop.
Python snippets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if any(bad in name for bad in NOT_ALLOWED): | |
raise ValueError("'name' may not contain any of {}".format(NOT_ALLOWED) | |
if not all(isinstance(val, int) for val in DATA) or len(DATA) !=2: | |
raise ValueError("'DATA' must consist of 2 ints") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment