Skip to content

Instantly share code, notes, and snippets.

@fereria
Created September 11, 2015 15:07
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 fereria/025f6da481cb8e8707dd to your computer and use it in GitHub Desktop.
Save fereria/025f6da481cb8e8707dd to your computer and use it in GitHub Desktop.
raise test
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