Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> class WrongNameError(Exception):
- ... def __init__(self, name: str) -> None:
- ... self.name = name
- ... def __str__(self) -> str:
- ... return f'You dumb piece of shit, there is no corpus with name {self.name}!'
- ...
- >>>
- >>> raise WrongNameError('wrong-corpus-name')
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- __main__.WrongNameError: You dumb piece of shit, there is no corpus with name wrong-corpus-name!
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement