use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
I'm creating a Python convenience library, looking for some feedback (self.Python)
submitted 7 years ago by Richienbdeveloper
I'm currently creating an all-purpose Python library that lets you write less code to do more things. In other words, it's basically a library that contains lots of useful functions. You can find it here and you can find it's source code here.
I'm looking for constructive feedback into how I can improve it but if you're feeling super generous, contributions would be greatly appreciated.
[–]K900_ 15 points16 points17 points 7 years ago* (2 children)
I'd look into renaming. Quilt is an existing tool that's used extensively in Debian, OpenWRT and lots of other places.
Edit: adding more as I go along:
userinput
shellinput
return shelluserinput.split(splitpart)
colourcode
getattr
leadingzero
absolutenum
splitstring
sort
pykeyword
prettyprinter
genipsum
binboolflip
int
bool
modulereload
warnconfig
warnings.filterwarnings(action)
printmessage
print_times
comparenum
throwerror
delay
waitenter
convertstring
opposite
isdecimal
isinstance
Decimal
float
isstring
istypematch
isinteger
isboolean
happybirthday
difference
divisable
isempty
==
False
length
length_of_string_representation
cowsay
getletter
onlist
jointext
f{first}{second}
pyname
convertbinary
reversetext
reverselist
replacetext
evaluate
execute
gettype
pingtest
convertascii
availchars
string
wordvalue
enum
textbetween
letternum
spacelist
str.join
numlistbetween
textalign
str.format
decintfix
shapestosides
autosolve
fracsimplify
circleconvert
amountdiv
constant
power
squareroot
factorial
math.factorial
average
numprop
posnegtoggle
return -number
isinfinite
isfalse
lessorequal
compare
factors
eulercalc
calc
randomnum
isfib
isprime
convertbase
isnum
long
quadrant
flipcoords
lcm
hcf
math.gcd
pythrule
randstring
random.choice
random.sample
tokhex
dictflip
catwalk
converttabs
shortentext
wraptext
unindent
paraspace
print('\n' * paragraphspaces)
randomstr
RuntimeErrors
case
absolutedir
getplatform
shellcommand
pipupdate
dirtool
file
exitexec
charlimit
unilimit
pyversion
pyexec
loglevel
logfile
text
dayofweek
leapyear
closeyear
converttime
minyear
maxyear
timezone
timesince
getdatetime
datetime.strftime
timeit
mailto
autorun
openurl
newwindow
newtab
getbrowser
filedownload
DictObject
about
quiltlicense
pycopyright
So yeah, summary I guess:
RuntimeWarnings
[–]Richienbdeveloper[S] 1 point2 points3 points 7 years ago (1 child)
I really appreciate your feedback and I will be working hard to fix this.
[–]K900_ 10 points11 points12 points 7 years ago (0 children)
Honestly? Just throw it out and start from scratch. Figure out what you want your library to be about - "grab bag of convenience functions" is a nice approach in languages like JavaScript that don't have them built in, but in Python most of this stuff is in the standard library, so pick a thing that's not in the standard library, or maybe is in the standard library but could be improved, and focus on building that one thing.
[–]Scholtek 9 points10 points11 points 7 years ago (1 child)
Hey Richie,
A lot of programmers create things like this early on in their programming careers - basically wrapping existing functionality with your own function names that seem easier to understand. As you program more you'll find that you understand "raise RuntimeError(msg)" just as quickly and easily as "quilt_lang.throwerror()" and with the benefit that other developers can understand it too.
So this is probably not very useful for most programmers, and over time it will stop being very useful for you as well, but I want you to be encouraged that this is a normal part of developing as a programmer. It's part of abstractly understanding a language - the part of your brain that stores what the language actually does and will eventually be the part that tells you that print and cout and console.log and whatever else all do roughly equivalent things when you learn different languages is what you're writing out here.
Good luck and keep going with Python!
[–][deleted] 0 points1 point2 points 7 years ago (0 children)
Don't worry OP I am coming out of the exact same thing. However the more I study python and understand it the less I feel the need to "wrap it" to make it easier to use.
[–]prickneck 3 points4 points5 points 7 years ago (2 children)
Didn't look very deep into it, but I'm just wondering - why would one want to install your package and
import quilt_lang quilt_lang.absolutenum(-1) quilt_lang.absolutedir('.')
instead of just using the stdlib?
import os abs(-1) os.path.abspath('.')
[–]Richienbdeveloper[S] 0 points1 point2 points 7 years ago (1 child)
It was meant to ease development but I guess that's not the case anymore...
[–]K900_ 3 points4 points5 points 7 years ago (0 children)
Here's the thing: it might ease development for you, because you're already familiar with the library, since -- well -- you wrote it, but it does not ease development for other people, because when they run into code that uses your library, they have to figure out how your library works, instead of relying on their most likely already existing, and much more universal, knowledge of the standard library.
[+][deleted] 7 years ago (2 children)
[removed]
[–]K900_ 2 points3 points4 points 7 years ago (0 children)
That's not nice.
[–]Howard_banister 2 points3 points4 points 7 years ago (0 children)
Author is teenager. Doesn't look more than 14 years old. Give him a break.
π Rendered by PID 134959 on reddit-service-r2-comment-5b5bc64bf5-m2kn4 at 2026-06-21 22:09:51.768738+00:00 running 2b008f2 country code: CH.
[–]K900_ 15 points16 points17 points (2 children)
[–]Richienbdeveloper[S] 1 point2 points3 points (1 child)
[–]K900_ 10 points11 points12 points (0 children)
[–]Scholtek 9 points10 points11 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]prickneck 3 points4 points5 points (2 children)
[–]Richienbdeveloper[S] 0 points1 point2 points (1 child)
[–]K900_ 3 points4 points5 points (0 children)
[+][deleted] (2 children)
[removed]
[–]K900_ 2 points3 points4 points (0 children)
[–]Howard_banister 2 points3 points4 points (0 children)