Created
September 11, 2015 15:07
-
-
Save fereria/025f6da481cb8e8707dd to your computer and use it in GitHub Desktop.
raise test
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
class ArgsNumException(Exception): | |
def __init__(self,value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def test(*args,**kwargs): | |
if len(args) != 3: | |
raise ArgsNumException(len(args)) | |
test(10) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment