Skip to content

Instantly share code, notes, and snippets.

@pnasrat
Created January 25, 2009 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pnasrat/51800 to your computer and use it in GitHub Desktop.
Save pnasrat/51800 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
class ValidatedClass:
def __init__(self, a, b, c, d, e, f, g):
if not self.checkval(b):
raise ValueError("b must be less than 10")
def checkval(self, val):
return val < 10
if __name__ == "__main__":
X = ValidatedClass( 1, 11, 3, 4, 5, 6, 7 )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment