Guest User

Untitled

a guest
Nov 17th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. class UnknownPrefix(Exception):
  2. '''Raised if a given prefix does not map to any items'''
  3. def __init__(self,prefix,*args):
  4. Exception.__init__(self,*args)
  5. self.prefix = prefix
  6.  
  7. class AmbiguousPrefix(Exception):
  8. '''Raised if a given prefix maps to multiple items'''
  9. def __init__(self,prefix,choices,*args):
  10. Exception.__init__(self,*args)
  11. self.prefix = prefix
  12. self.choices = choices
Add Comment
Please, Sign In to add comment