Pointless utilities for python.
Project description
Pointless Utils
A collection of utilities that are (probably) pointless.
Decorators
There are currently 6 pointless decorators available to use:
@none
- Causes the function to always returnNone
@true
- Causes the function to always returnTrue
@false
- Causes the function to always returnFalse
@maybe
- Causes the function to return a random choice ofTrue
orFalse
@never
- The function will never return and will block indefinitely@always
- The function is now a generator that indefinitely yieldsTrue
@alwaysv(value)
- The function is now a generator that indefinitely yields the given value
These decorators can be used on either normal or async functions, except alwaysv
. For example:
@maybe
def ex_1():
pass
@maybe
async def ex_2():
pass
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
pointlessutils-0.1.4.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for pointlessutils-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b25dcb1d5746622ee4a1fef9141ed28b8a55b37f6831f2054edb14a3d4b450a |
|
MD5 | 691cf0d60a5a65f9b20ed91910ce4ae6 |
|
BLAKE2b-256 | f268d2406d9f546d8a84398435b91c985044d3ff7e0a1ae5f60589073827e972 |