Skip to content

Python fork of Swas.py's better-python! Check him out please.

License

Notifications You must be signed in to change notification settings

waqasislam/better-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


POSTPONED TILL AUGUST 19

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.

Installation

pip3 install git+https://github.com/waqasislam/better-python.git --upgrade

Example

from betterpython import modify
@modify(str, list, tuple)
def __invert__(self):
  return self[::-1]

Same example in forbiddenfruit

from forbiddenfruit import curse
def __invert__(self):
  return self[::-1]

curse(str,'__invert__',__invert__)
curse(list,'__invert__',__invert__)
curse(tuple,'__invert__',__invert__)

Want to modify strings fast?

Better-python is perfect at that. You can make your own modifier functions.

UWU Example

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.

Running tests

echo "in progress"

TODO (updated)

  • ~~ Add more list functionality

Important Notice!

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

About

Python fork of Swas.py's better-python! Check him out please.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.1%
  • Shell 0.9%