Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. >>> class WrongNameError(Exception):
  2. ...     def __init__(self, name: str) -> None:
  3. ...         self.name = name
  4. ...     def __str__(self) -> str:
  5. ...         return f'You dumb piece of shit, there is no corpus with name {self.name}!'
  6. ...
  7. >>>
  8. >>> raise WrongNameError('wrong-corpus-name')
  9. Traceback (most recent call last):
  10.   File "<stdin>", line 1, in <module>
  11. __main__.WrongNameError: You dumb piece of shit, there is no corpus with name wrong-corpus-name!
  12. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement