Created
July 19, 2012 16:06
-
-
Save ianawilson/3144970 to your computer and use it in GitHub Desktop.
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 we get both or neither, no good | |
if not (bool(timeAssignment) ^ bool(dropTake)): | |
raise DropError('drop() takes either a ' + self.family.RecurringTimeAssignment.__name__ + ' or ' + self.family.DropTake.__name__ + ' as an argument but not both nor neither') | |
if timeAssignment and not type(timeAssignment) == self.family.RecurringTimeAssignment: | |
raise TypeError('timeAssignment must be a ' + self.family.RecurringTimeAssignment.__name__) | |
if dropTake and not type(dropTake) == self.family.DropTake: | |
raise TypeError('dropTake must be a '+ self.family.DropTake.__name__) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment