Intentionally insulting exceptions
Project description
This package provides a set of insulting exceptions you can use to make your future self laugh, bother your collaborators, or both.
The core feature is the InsultError exception class, which behaves just like a normal exception with a few differences: 1. The raised error is a randomly-selected subclass with a silly, insulting name 2. If no message is provided, the error will use a random insulting message 3. A special keyword argument rating provides some control over how offensive you want the error and message to be
Please contribute! This package will be much more fun if not limited to the measily initial set of options. Obviously, racist, sexist, or other bullshit jokes are not welcome.
Example Usage
from insult_error import InsultError
# raise a random insult with a random message (defaults to "PG" rating)
raise InsultError()
# >>> NotThisAgain: Don't believe everything you think.
# raise a random insult with a user-specified message
raise InsultError('This is my message')
# >>> NotThisAgain: This is my message
# raise a random insult with <= PG rating
raise InsultError(rating="PG")
# >>> ForGodsSake: I don’t have the time or the crayons to explain this to you.
# raise a random insult with <= R rating
raise InsultError(rating="R")
# >>> FuckYouBuddy: I envy people who have never met you.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for insult_error-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a65c0cb2dddd63ef01c906c2a92baecf0a5e6acb1210afd74f744aea8b24a5f8 |
|
MD5 | 2b9f1947d109bfe274cc254718c995cb |
|
BLAKE2b-256 | 8d3a0934493682715948415cd2cbb54af0a55dd7602af0fad4d4b60508bc1831 |