A fork of CodeWithSwastik's better-python. (will be renamed)
Better-python is a libary designed to add more functionality to python3. Check some examples below.
pip3 install git+https://github.com/waqasislam/better-python.git --upgrade
from betterpython import modify
@modify(str, list, tuple)
def __invert__(self):
return self[::-1]
from forbiddenfruit import curse
def __invert__(self):
return self[::-1]
curse(str,'__invert__',__invert__)
curse(list,'__invert__',__invert__)
curse(tuple,'__invert__',__invert__)
Better-python is perfect at that. You can make your own modifier functions.
from betterpython import modify
@modify(str)
@property
def uwu(self):
self.replace('l', 'w')
print('hello'.uwu())
#--OUTPUT:
#'hewwo'
All though this looks small its just a little example of what better-python can do.
echo "in progress"
- ~~ Add more list functionality
This is not a repo to replace CodeWithSwastik's better-python. It will probably be made into a pull request into the original github repo. Original Join the TCA discord server: https://discord.gg/TXF3hBj